#include <StepData_StepWriter.hxx>
Public Member Functions | |
void * | operator new (size_t, void *anAddress) |
void * | operator new (size_t size) |
void | operator delete (void *anAddress) |
Standard_EXPORT | StepData_StepWriter (const Handle(StepData_StepModel)&amodel) |
Creates an empty StepWriter from a StepModel. The StepModel provides the Number of Entities, as identifiers for File . | |
Standard_EXPORT Standard_Integer & | LabelMode () |
ModeLabel controls how to display entity ids : 0 (D) gives entity number in the model 1 gives the already recorded label (else, its number) Warning : conflicts are not controlled . | |
Standard_EXPORT Standard_Integer & | TypeMode () |
TypeMode controls the type form to use : 0 (D) for normal long form 1 for short form (if a type name has no short form, normal long form is then used) . | |
Standard_EXPORT Interface_FloatWriter & | 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 . | |
Standard_EXPORT void | SetScope (const Standard_Integer numscope, const Standard_Integer numin) |
Declares the Entity Number <numscope> to correspond to a Scope which contains the Entity Number <numin>. Several calls to the same <numscope> add Entities in this Scope, in this order. //! Error if <numin> is already declared in the Scope Warning : the declaration of the Scopes is assumed to be consistent, i.e. <numin> is not referenced from outside this Scope (not checked here) . | |
Standard_EXPORT Standard_Boolean | IsInScope (const Standard_Integer num) const |
Returns True if an Entity identified by its Number is in a Scope . | |
Standard_EXPORT void | SendModel (const Handle(StepData_Protocol)&protocol, const Standard_Boolean headeronly=Standard_False) |
Sends the complete Model, included HEADER and DATA Sections Works with a WriterLib defined through a Protocol If <headeronly> is given True, only the HEADER Section is sent (used to Dump the Header of a StepModel) . | |
Standard_EXPORT void | SendHeader () |
Begins model header . | |
Standard_EXPORT void | SendData () |
Begins data section; error if EndSec was not set . | |
Standard_EXPORT void | SendEntity (const Standard_Integer nument, const StepData_WriterLib &lib) |
Send an Entity of the Data Section. If it corresponds to a Scope, also Sends the Scope informations and contained Items . | |
Standard_EXPORT void | EndSec () |
sets end of section; to be done before passing to next one | |
Standard_EXPORT void | EndFile () |
sets end of file; error is EndSec was not set | |
Standard_EXPORT void | NewLine (const Standard_Boolean evenempty) |
flushes current line; if empty, flushes it (defines a new empty line) if evenempty is True; else, skips it | |
Standard_EXPORT void | JoinLast (const Standard_Boolean newline) |
joins current line to last one, only if new length is 72 max if newline is True, a new current line begins; else, current line is set to the last line (once joined) itself an can be completed | |
Standard_EXPORT void | Indent (const Standard_Boolean onent) |
asks that further indentations will begin at position of entity first opening bracket; else they begin at zero (def) for each sublist level, two more blancks are added at beginning (except for text continuation, which must begin at true zero) | |
Standard_EXPORT void | SendIdent (const Standard_Integer ident) |
begins an entity with an ident plus '=' (at beginning of line) entity ident is its Number given by the containing Model Warning : <ident> must be, either Number or Label, according LabelMode | |
Standard_EXPORT void | SendScope () |
sets a begin of Scope (ends this line) | |
Standard_EXPORT void | SendEndscope () |
sets an end of Scope (on a separate line) | |
Standard_EXPORT void | Comment (const Standard_Boolean mode) |
sets a comment mark : if mode is True, begins Comment zone, if mode is False, ends Comment zone (if one is begun) | |
Standard_EXPORT void | SendComment (const Handle(TCollection_HAsciiString)&text) |
sends a comment. Error if we are not inside a comment zone | |
Standard_EXPORT void | SendComment (const Standard_CString text) |
same as above but accepts a CString (ex.: "..." directly) | |
Standard_EXPORT void | StartEntity (const TCollection_AsciiString &atype) |
sets entity's StepType, opens brakets, starts param no to 0 params are separated by comma Remark : for a Multiple Type Entity (see Express ANDOR clause) StartComplex must be called before sending componants, then each "Componant" must be send separately (one call to StartEntity for each one) : the Type which preceeds is then automaticaly closed. Once all the componants have been sent, EndComplex must be called, then and only then EndEntity | |
Standard_EXPORT void | StartComplex () |
sends the start of a complex entity, which is a simple open bracket (without increasing braket level) It must be called JUST AFTER SendEntity and BEFORE sending componants, each one begins by StartEntity | |
Standard_EXPORT void | EndComplex () |
sends the end of a complex entity : a simple closed bracket It must be called AFTER sending all the componants and BEFORE the final call to EndEntity | |
Standard_EXPORT void | SendField (const StepData_Field &fild, const Handle(StepData_PDescr)&descr) |
Sends the content of a field, controlled by its descriptor If the descriptor is not defined, follows the description detained by the field itself . | |
Standard_EXPORT void | SendSelect (const Handle(StepData_SelectMember)&sm, const Handle(StepData_PDescr)&descr) |
Sends a SelectMember, which cab be named or not . | |
Standard_EXPORT void | SendList (const StepData_FieldList &list, const Handle(StepData_ESDescr)&descr) |
Send the content of an entity as being a FieldList controlled by its descriptor. This includes start and end brackets but not the entity type . | |
Standard_EXPORT void | OpenSub () |
open a sublist by a '(' | |
Standard_EXPORT void | OpenTypedSub (const Standard_CString subtype) |
open a sublist with its type then a '(' | |
Standard_EXPORT void | CloseSub () |
closes a sublist by a ')' | |
Standard_EXPORT void | AddParam () |
prepares adding a parameter (that is, adds ',' except for first one); normally for internal use; can be used to send a totally empty parameter (with no litteral value) | |
Standard_EXPORT void | Send (const Standard_Integer val) |
sends an integer parameter | |
Standard_EXPORT void | Send (const Standard_Real val) |
sends a real parameter (wroks with FloatWriter) | |
Standard_EXPORT void | Send (const TCollection_AsciiString &val) |
sends a text given as string (it will be set between '...') | |
Standard_EXPORT void | Send (const Handle(Standard_Transient)&val) |
sends a reference to an entity (its identifier with '#') REMARK 1 : a Null <val> is interpreted as "Undefined" REMARK 2 : for an HAsciiString which is not recorded in the Model, it is send as its String Content, between quotes | |
Standard_EXPORT void | SendBoolean (const Standard_Boolean val) |
sends a Boolean as .T. for True or .F. for False (it is an useful case of Enum, which is built-in) | |
Standard_EXPORT void | SendLogical (const StepData_Logical val) |
sends a Logical as .T. or .F. or .U. according its Value (it is a standard case of Enum for Step, and is built-in) | |
Standard_EXPORT void | SendString (const TCollection_AsciiString &val) |
sends a string exactly as it is given | |
Standard_EXPORT void | SendString (const Standard_CString val) |
sends a string exactly as it is given | |
Standard_EXPORT void | SendEnum (const TCollection_AsciiString &val) |
sends an enum given by String (litteral expression) adds '.' around it if not done Remark : val can be computed by class EnumTool from StepData: StepWriter.SendEnum (myenum.Text(enumval)); | |
Standard_EXPORT void | SendEnum (const Standard_CString val) |
sends an enum given by String (litteral expression) adds '.' around it if not done | |
Standard_EXPORT void | SendArrReal (const Handle(TColStd_HArray1OfReal)&anArr) |
sends an array of real | |
Standard_EXPORT void | SendUndef () |
sends an undefined (optionnal absent) parameter (by '$') | |
Standard_EXPORT void | SendDerived () |
sends a "Derived" parameter (by '*'). A Derived Parameter has been inherited from a Super-Type then redefined as being computed by a function. Hence its value in file is senseless. | |
Standard_EXPORT void | EndEntity () |
sends end of entity (closing bracket plus ';') Error if count of opened-closed brackets is not null | |
Standard_EXPORT Interface_CheckIterator | CheckList () const |
Returns the check-list, which has received possible checks : for unknown entities, badly loaded ones, null or unknown references . | |
Standard_EXPORT Standard_Integer | NbLines () const |
Returns count of Lines . | |
Standard_EXPORT Handle_TCollection_HAsciiString | Line (const Standard_Integer num) const |
Returns a Line given its rank in the File . | |
Standard_EXPORT Standard_Boolean | Print (Standard_OStream &S) |
writes result on an output defined as an OStream then clears it | |
Private Member Functions | |
Standard_EXPORT void | AddString (const TCollection_AsciiString &str, const Standard_Integer more=0) |
adds a string to current line; first flushes it if full (72 char); more allows to ask a reserve at end of line : flush is done if remaining length (to 72) is less than <more> | |
Standard_EXPORT void | AddString (const Standard_CString str, const Standard_Integer lnstr, const Standard_Integer more=0) |
Same as above, but the string is given by CString + Length . | |
Private Attributes | |
Handle_StepData_StepModel | themodel |
Handle_TColStd_HSequenceOfHAsciiString | thefile |
Interface_LineBuffer | thecurr |
Standard_Boolean | thesect |
Standard_Boolean | thecomm |
Standard_Boolean | thefirst |
Standard_Boolean | themult |
Standard_Integer | thelevel |
Standard_Boolean | theindent |
Standard_Integer | theindval |
Standard_Integer | thetypmode |
Interface_FloatWriter | thefloatw |
Interface_CheckIterator | thechecks |
Standard_Integer | thenum |
Standard_Integer | thelabmode |
Handle_TColStd_HArray1OfInteger | thescopebeg |
Handle_TColStd_HArray1OfInteger | thescopeend |
Handle_TColStd_HArray1OfInteger | thescopenext |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|