/********************************************************************/ /* Copyright (c) 2017 System fugen G.K. and Yuzi Mizuno */ /* All rights reserved. */ /********************************************************************/ #if !defined( __IGESOFSTREAM_H__) #define __IGESOFSTREAM_H__ #include #include #include "mg/Pvector.h" #include "mgIges/IgesFstream.h" #include "mgIges/IgesDEStatusNumber.h" // forward declarations class MGObject; class MGGroup; class MGAttribedGel; class MGGel; class MGIgesPD; /** @addtogroup FileInputOutput * @{ */ ///MGOgesIfstream write out to *.iges file, transforming MGCL objects to IGES objects. class MG_DLL_DECLR MGIgesOfstream: public MGIgesFstream{ // Constructors. public: /// Creates an object of class MGIgesOfstream with a filename. MGIgesOfstream(const TCHAR* filename=0, const MGBox* bx=0); /// Creates an object of class MGIgesOfstream with a filename. MGIgesOfstream(const CString& filename, const MGBox* bx=0); /// Destroys an object of class MGIgesOfstream. ~MGIgesOfstream(); /// Operator overload. public: /// Writes an object of the MGCL as an object of the IGES. MGIgesOfstream& operator<<(const MGGel&); /// Writes all objects of the MGGroup stored in group /// as IGES objects. MGIgesOfstream& operator<<(const MGGroup&); /// Member functions. public: ///Get the reference of the output stream. std::ofstream& get_ofstream(){return m_ofstream;}; ///Test if output stream is open. bool is_open(){return m_ofstream.is_open();}; ///Open the file. When this is opened already, this will be closed, then will ///be opened. void open(const TCHAR* filename, const MGBox* bx=0); void close(); ///Create de as a newed object, and push back to this MGIgesOfstream. ///The ownership of pd is transfered to the created DE, and the ownership of ///the created DE will be transfered to this MGIgesOfstream. ///Function's return value is the DE id created. If DE pointer is necessary, ///get_DE() is the one. ///SubordinateEntitySwitch is set as independent when gel is input, and ///set as PLDependent when gel is not input(input as null). int create_de( MGIgesPD* pd,/// m_plines; ///