Open CASCADE Technology  7.6.0.dev
Public Member Functions
IGESData_IGESWriter Class Reference

manages atomic file writing, under control of IGESModel : prepare text to be sent then sends it takes into account distinction between successive Sections More...

#include <IGESData_IGESWriter.hxx>

Public Member Functions

 IGESData_IGESWriter (const Handle< IGESData_IGESModel > &amodel)
 Creates an IGESWriter, empty ready to work (see the methods SendModel and Print) More...
 
 IGESData_IGESWriter ()
 Default constructor (not used) to satisfy the compiler. More...
 
 IGESData_IGESWriter (const IGESData_IGESWriter &other)
 Constructor by copy (not used) to satisfy the compiler. More...
 
Interface_FloatWriterFloatWriter ()
 Returns the embedded FloatWriter, which controls sending Reals Use this method to access FloatWriter in order to consult or change its options (MainFormat, FormatForRange,ZeroSuppress), because it is returned as the address of its field. More...
 
Standard_IntegerWriteMode ()
 Returns the write mode, in order to be read and/or changed Write Mode controls the way final print works 0 (D) : Normal IGES, 10 : FNES. More...
 
void SendStartLine (const Standard_CString startline)
 Sends an additionnal Starting Line : this is the way used to send comments in an IGES File (at beginning of the file). If the line is more than 72 char.s long, it is splited into as many lines as required to send it completely. More...
 
void SendModel (const Handle< IGESData_Protocol > &protocol)
 Sends the complete IGESModel (Global Section, Entities as Directory Entries & Parameter Lists, etc...) i.e. fills a list of texts. Once filled, it can be sent by method Print. More...
 
void SectionS ()
 declares sending of S section (only a declaration) error if state is not initial More...
 
void SectionG (const IGESData_GlobalSection &header)
 prepares sending of header, from a GlobalSection (stores it) error if SectionS was not called just before takes in account special characters (Separator, EndMark) More...
 
void SectionsDP ()
 prepares sending of list of entities, as Sections D (directory list) and P (Parameters lists, one per entity) Entities will be then processed, one after the other error if SectionG has not be called just before More...
 
void SectionT ()
 declares sending of T section (only a declaration) error if does not follow Entities sending More...
 
void DirPart (const Handle< IGESData_IGESEntity > &anent)
 translates directory part of an Entity into a literal DirPart Some infos are computed after sending parameters Error if not in sections DP or Stage not "Dir" More...
 
void OwnParams (const Handle< IGESData_IGESEntity > &anent)
 sends own parameters of the entity, by sending firstly its type, then calling specific method WriteOwnParams Error if not in sections DP or Stage not "Own" More...
 
void Associativities (const Handle< IGESData_IGESEntity > &anent)
 sends associativity list, as complement of parameters list error if not in sections DP or Stage not "Associativity" More...
 
void Properties (const Handle< IGESData_IGESEntity > &anent)
 sends property list, as complement of parameters list error if not in sections DP or Stage not "Property" More...
 
void EndEntity ()
 declares end of sending an entity (ends param list by ';') More...
 
void SendVoid ()
 sends a void parameter, that is null text More...
 
void Send (const Standard_Integer val)
 sends an Integer parameter More...
 
void SendBoolean (const Standard_Boolean val)
 sends a Boolean parameter as an Integer value 0(False)/1(True) More...
 
void Send (const Standard_Real val)
 sends a Real parameter. Works with FloatWriter More...
 
void Send (const Handle< TCollection_HAsciiString > &val)
 sends a Text parameter under Hollerith form More...
 
void Send (const Handle< IGESData_IGESEntity > &val, const Standard_Boolean negative=Standard_False)
 sends a Reference to an Entity (if its Number is N, its pointer is 2*N-1) If <val> is Null, "0" will be sent If <negative> is True, "Pointer" is sent as negative More...
 
template<class T >
void Send (const Handle< T > &val, Standard_Boolean negative=Standard_False, typename opencascade::std::enable_if< opencascade::std::is_base_of< IGESData_IGESEntity, T >::value >::type *=0)
 Helper method to avoid ambiguity of calls to above methods Send() for classes derived from IGESData_IGESEntity, for VC++ 10 and 11 compillers. More...
 
void SendString (const Handle< TCollection_HAsciiString > &val)
 sends a parameter under its exact form given as a string More...
 
void Send (const gp_XY &val)
 Sends a XY, interpreted as a couple of 2 Reals (X & Y) More...
 
void Send (const gp_XYZ &val)
 Sends a XYZ, interpreted as a couple of 2 Reals (X , Y & Z) More...
 
Handle< TColStd_HSequenceOfHAsciiString > SectionStrings (const Standard_Integer numsec) const
 Returns the list of strings for a section given its rank 1 : Start (if not empty) 2 : Global 3 or 4 : Parameters RQ: no string list for Directory section An empty section gives a null handle. More...
 
Standard_Boolean Print (Standard_OStream &S) const
 Writes result on an output defined as an OStream resolves stored infos at this time; in particular, numbers of lines used to adress P-section from D-section and final totals Takes WriteMode into account. More...
 

Detailed Description

manages atomic file writing, under control of IGESModel : prepare text to be sent then sends it takes into account distinction between successive Sections

Constructor & Destructor Documentation

◆ IGESData_IGESWriter() [1/3]

IGESData_IGESWriter::IGESData_IGESWriter ( const Handle< IGESData_IGESModel > &  amodel)

Creates an IGESWriter, empty ready to work (see the methods SendModel and Print)

◆ IGESData_IGESWriter() [2/3]

IGESData_IGESWriter::IGESData_IGESWriter ( )

Default constructor (not used) to satisfy the compiler.

◆ IGESData_IGESWriter() [3/3]

IGESData_IGESWriter::IGESData_IGESWriter ( const IGESData_IGESWriter other)

Constructor by copy (not used) to satisfy the compiler.

Member Function Documentation

◆ Associativities()

void IGESData_IGESWriter::Associativities ( const Handle< IGESData_IGESEntity > &  anent)

sends associativity list, as complement of parameters list error if not in sections DP or Stage not "Associativity"

◆ DirPart()

void IGESData_IGESWriter::DirPart ( const Handle< IGESData_IGESEntity > &  anent)

translates directory part of an Entity into a literal DirPart Some infos are computed after sending parameters Error if not in sections DP or Stage not "Dir"

◆ EndEntity()

void IGESData_IGESWriter::EndEntity ( )

declares end of sending an entity (ends param list by ';')

◆ FloatWriter()

Interface_FloatWriter& IGESData_IGESWriter::FloatWriter ( )

Returns the embedded FloatWriter, which controls sending Reals Use this method to access FloatWriter in order to consult or change its options (MainFormat, FormatForRange,ZeroSuppress), because it is returned as the address of its field.

◆ OwnParams()

void IGESData_IGESWriter::OwnParams ( const Handle< IGESData_IGESEntity > &  anent)

sends own parameters of the entity, by sending firstly its type, then calling specific method WriteOwnParams Error if not in sections DP or Stage not "Own"

◆ Print()

Standard_Boolean IGESData_IGESWriter::Print ( Standard_OStream S) const

Writes result on an output defined as an OStream resolves stored infos at this time; in particular, numbers of lines used to adress P-section from D-section and final totals Takes WriteMode into account.

◆ Properties()

void IGESData_IGESWriter::Properties ( const Handle< IGESData_IGESEntity > &  anent)

sends property list, as complement of parameters list error if not in sections DP or Stage not "Property"

◆ SectionG()

void IGESData_IGESWriter::SectionG ( const IGESData_GlobalSection header)

prepares sending of header, from a GlobalSection (stores it) error if SectionS was not called just before takes in account special characters (Separator, EndMark)

◆ SectionS()

void IGESData_IGESWriter::SectionS ( )

declares sending of S section (only a declaration) error if state is not initial

◆ SectionsDP()

void IGESData_IGESWriter::SectionsDP ( )

prepares sending of list of entities, as Sections D (directory list) and P (Parameters lists, one per entity) Entities will be then processed, one after the other error if SectionG has not be called just before

◆ SectionStrings()

Handle< TColStd_HSequenceOfHAsciiString > IGESData_IGESWriter::SectionStrings ( const Standard_Integer  numsec) const

Returns the list of strings for a section given its rank 1 : Start (if not empty) 2 : Global 3 or 4 : Parameters RQ: no string list for Directory section An empty section gives a null handle.

◆ SectionT()

void IGESData_IGESWriter::SectionT ( )

declares sending of T section (only a declaration) error if does not follow Entities sending

◆ Send() [1/7]

void IGESData_IGESWriter::Send ( const Standard_Integer  val)

sends an Integer parameter

◆ Send() [2/7]

void IGESData_IGESWriter::Send ( const Standard_Real  val)

sends a Real parameter. Works with FloatWriter

◆ Send() [3/7]

void IGESData_IGESWriter::Send ( const Handle< TCollection_HAsciiString > &  val)

sends a Text parameter under Hollerith form

◆ Send() [4/7]

void IGESData_IGESWriter::Send ( const Handle< IGESData_IGESEntity > &  val,
const Standard_Boolean  negative = Standard_False 
)

sends a Reference to an Entity (if its Number is N, its pointer is 2*N-1) If <val> is Null, "0" will be sent If <negative> is True, "Pointer" is sent as negative

◆ Send() [5/7]

template<class T >
void IGESData_IGESWriter::Send ( const Handle< T > &  val,
Standard_Boolean  negative = Standard_False,
typename opencascade::std::enable_if< opencascade::std::is_base_of< IGESData_IGESEntity, T >::value >::type *  = 0 
)
inline

Helper method to avoid ambiguity of calls to above methods Send() for classes derived from IGESData_IGESEntity, for VC++ 10 and 11 compillers.

◆ Send() [6/7]

void IGESData_IGESWriter::Send ( const gp_XY val)

Sends a XY, interpreted as a couple of 2 Reals (X & Y)

◆ Send() [7/7]

void IGESData_IGESWriter::Send ( const gp_XYZ val)

Sends a XYZ, interpreted as a couple of 2 Reals (X , Y & Z)

◆ SendBoolean()

void IGESData_IGESWriter::SendBoolean ( const Standard_Boolean  val)

sends a Boolean parameter as an Integer value 0(False)/1(True)

◆ SendModel()

void IGESData_IGESWriter::SendModel ( const Handle< IGESData_Protocol > &  protocol)

Sends the complete IGESModel (Global Section, Entities as Directory Entries & Parameter Lists, etc...) i.e. fills a list of texts. Once filled, it can be sent by method Print.

◆ SendStartLine()

void IGESData_IGESWriter::SendStartLine ( const Standard_CString  startline)

Sends an additionnal Starting Line : this is the way used to send comments in an IGES File (at beginning of the file). If the line is more than 72 char.s long, it is splited into as many lines as required to send it completely.

◆ SendString()

void IGESData_IGESWriter::SendString ( const Handle< TCollection_HAsciiString > &  val)

sends a parameter under its exact form given as a string

◆ SendVoid()

void IGESData_IGESWriter::SendVoid ( )

sends a void parameter, that is null text

◆ WriteMode()

Standard_Integer& IGESData_IGESWriter::WriteMode ( )

Returns the write mode, in order to be read and/or changed Write Mode controls the way final print works 0 (D) : Normal IGES, 10 : FNES.


The documentation for this class was generated from the following file: