MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
IgesOfstream.h
1 /********************************************************************/
2 /* Copyright (c) 2015 DG Technologies Inc. and Yuzi Mizuno */
3 /* All rights reserved. */
4 /********************************************************************/
5 #if !defined( __IGESOFSTREAM_H__)
6 #define __IGESOFSTREAM_H__
7 
8 #include <fstream>
9 #include <string>
10 #include "mg/Pvector.h"
11 #include "mgIges/IgesFstream.h"
12 #include "mgIges/IgesDEStatusNumber.h"
13 
14 // forward declarations
15 class MGObject;
16 class MGGroup;
17 class MGAttribedGel;
18 class MGGel;
19 class MGIgesPD;
20 
25 class MG_DLL_DECLR MGIgesOfstream: public MGIgesFstream{
27 
28 // Constructors.
29 public:
30 
32  MGIgesOfstream(const TCHAR* filename=0, const MGBox* bx=0);
33 
35  MGIgesOfstream(const CString& filename, const MGBox* bx=0);
36 
38  ~MGIgesOfstream();
39 
41 public:
42 
45 
49 
51 public:
52 
54  std::ofstream& get_ofstream(){return m_ofstream;};
55 
57  bool is_open(){return m_ofstream.is_open();};
58 
61  void open(const TCHAR* filename, const MGBox* bx=0);
62  void close();
63 
71  int create_de(
72  MGIgesPD* pd,
73  const std::string& EntityLabel,
74  int ses=0,
75  const MGAttribedGel* gel=0,
76  int FormNumber=0
77  );
78 
81  bool good()const{return m_ofstream.good();};
82 
86  void append_param_line(MGIgesParamLine* pline){m_plines.push_back(pline);};
87 
89  int get_next_param_line_count()const{return (int)(m_plines.size()+1);};
90 
92  int get_line_number_of_PD()const{return (int)m_plines.size();};
93 
95  void write_out_start_section();
96  void write_out_terminate_section();
97 
101  void write_out_DE_PD_lines();
102 
106  void write_out_PD_plines();
107 
109  std::ofstream& ofstrm(){return m_ofstream;};
110 
111 private:
112 
113  std::ofstream m_ofstream;
114 
119 
121  void initialize(const TCHAR* filename=0, const MGBox* bx=0);
122 
127  int write_out_PD_pline(int DEpointer);
128 
129 };
130  // end of FileInputOutput group
132 #endif // __IGESOFSTREAM_H__
bool good() const
Definition: IgesOfstream.h:81
void append_param_line(MGIgesParamLine *pline)
Definition: IgesOfstream.h:86
std::ofstream & get_ofstream()
Member functions.
Definition: IgesOfstream.h:54
std::ostream & operator<<(std::ostream &ostrm, const MGisect &is)
Debug Function.
Definition: isect.h:95
Is an abstract class which represents a whole geometry and a topology.
Definition: Object.h:42
Defines a Box of any space dimendion.
Definition: Box.h:34
MGGel is an abstract class which represents a group element.
Definition: Gel.h:53
MGIgesParamLine describes a line of Parameter Data of an IGES file.
Definition: IgesParamLine.h:15
Is an abstract class which provides interfaces of MGGel that has MGAppearance.
Definition: AttribedGel.h:32
bool is_open()
Test if output stream is open.
Definition: IgesOfstream.h:57
MGIgesPD is the parent class of all the Parameter data section type.
Definition: igesPD.h:17
virtual void initialize(const TCHAR *filename=0)
Initialize all the member data to the state of no_value_holding.
MGIgesFstream is a super class for MGIfstream and MGOfstream.
Definition: Igesfstream.h:24
MGOgesIfstream write out to *.iges file, transforming MGCL objects to IGES objects.
Definition: IgesOfstream.h:26
MGGroup is a class which constains MGGel elements.
Definition: Group.h:35
int get_line_number_of_PD() const
get the output line number of Parameter Data Section.
Definition: IgesOfstream.h:92
std::ofstream & ofstrm()
Obtain output file stream reference.
Definition: IgesOfstream.h:109
int get_next_param_line_count() const
Get the next parameter data section record counter.
Definition: IgesOfstream.h:89