MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
Igesfstream.h
1 /********************************************************************/
2 /* Copyright (c) 2015 DG Technologies Inc. and Yuzi Mizuno */
3 /* All rights reserved. */
4 /********************************************************************/
5 #if !defined( __IGESFSTREAM_H__)
6 #define __IGESFSTREAM_H__
7 
8 #include "mg/MGCL.h"
9 #include "mg/Pvector.h"
10 #include "mgIges/Iges.h"
11 #include "mgIges/IgesGSec.h"
12 #include "mgIges/IgesDirectoryEntry.h"
13 #include "mgIges/IgesParamLine.h"
14 class MGBox;
15 
20 
24 class MG_DLL_DECLR MGIgesFstream{
25 
27 public:
28 
30  virtual ~MGIgesFstream(){;}
31 
33  virtual void initialize(const TCHAR* filename=0);
34 
36  int push_back_DE(MGIgesDirectoryEntry* de);
37 
40  return m_DirectoryEntries[DEid];
41  };
42  const MGIgesDirectoryEntry* directoryEntry(int DEid)const{
43  return m_DirectoryEntries[DEid];
44  };
45 
46  void clearStartSection(){m_StartSection=std::string();};
47  void clearGSection(){m_GSection=MGIgesGSec();};
48  void clearDirectoryEntries(){m_DirectoryEntries.clear();};
49  void clear(){clearStartSection(); clearDirectoryEntries(); clearDirectoryEntries();};
50  void set_GSec_max_coordinate_value(const MGBox* bx=0);
51  void set_initial_StartSection();
52 
53  const MGIgesGSec& GSection()const{return m_GSection;};
54  MGIgesGSec& GSection(){return m_GSection;};
55 
57  int get_line_number_of_SS()const{return (int)(m_StartSection.size()/72+1);};
58 
60  int get_line_number_of_GS()const{return m_nlineGSec;};
61 
63  int get_line_number_of_DE()const{return ((int)(m_DirectoryEntries.size()-1)*2);};
64 
65 protected:
66 
67 // Data members.
68 
69  std::string m_StartSection;
73 };
76  // end of FileInputOutput group
78 #endif // __IGESFSTREAM_H__
int get_line_number_of_GS() const
get the output line number of Global Sections.
Definition: Igesfstream.h:60
const MGIgesGSec & GSection() const
Definition: Igesfstream.h:53
void clear()
Definition: Igesfstream.h:49
MGIgesDirectoryEntry describes a directory entry section of an IGES file.
Definition: IgesDirectoryEntry.h:20
void clearGSection()
Definition: Igesfstream.h:47
virtual ~MGIgesFstream()
Constructors.
Definition: Igesfstream.h:30
Defines a Box of any space dimendion.
Definition: Box.h:34
MGIgesGSec m_GSection
Global section data.
Definition: Igesfstream.h:70
int m_nlineGSec
Number of the lines of Global section.
Definition: Igesfstream.h:71
void clearStartSection()
Definition: Igesfstream.h:46
MGIgesFstream is a super class for MGIfstream and MGOfstream.
Definition: Igesfstream.h:24
MGPvector< MGIgesDirectoryEntry > m_DirectoryEntries
Definition: Igesfstream.h:72
MGIgesDirectoryEntry * directoryEntry(int DEid)
Return directory entry point of DEid.
Definition: Igesfstream.h:39
MGIgesGSec describes a Global Section of a IGES file.
Definition: IgesGSec.h:18
MGIgesGSec & GSection()
Definition: Igesfstream.h:54
void clearDirectoryEntries()
Definition: Igesfstream.h:48
const MGIgesDirectoryEntry * directoryEntry(int DEid) const
Definition: Igesfstream.h:42
int get_line_number_of_SS() const
get the output line number of Start Section.
Definition: Igesfstream.h:57