Open CASCADE Technology 7.7.2
|
Performs Read and Write a STEP File with a STEP Model Following the protocols, Copy may be implemented or not. More...
#include <StepSelect_WorkLibrary.hxx>
Public Member Functions | |
StepSelect_WorkLibrary (const Standard_Boolean copymode=Standard_True) | |
Creates a STEP WorkLibrary <copymode> precises whether Copy is implemented or not. | |
void | SetDumpLabel (const Standard_Integer mode) |
Selects a mode to dump entities 0 (D) : prints numbers, then displays table number/label 1 : prints labels, then displays table label/number 2 : prints labels onky. | |
Standard_Integer | ReadFile (const Standard_CString name, Handle< Interface_InterfaceModel > &model, const Handle< Interface_Protocol > &protocol) const override |
Reads a STEP File and returns a STEP Model (into <mod>), or lets <mod> "Null" in case of Error Returns 0 if OK, 1 if Read Error, -1 if File not opened. | |
Standard_Integer | ReadStream (const Standard_CString theName, std::istream &theIStream, Handle< Interface_InterfaceModel > &model, const Handle< Interface_Protocol > &protocol) const override |
Reads a STEP File from stream and returns a STEP Model (into <mod>), or lets <mod> "Null" in case of Error Returns 0 if OK, 1 if Read Error, -1 if File not opened. | |
Standard_Boolean | WriteFile (IFSelect_ContextWrite &ctx) const override |
Writes a File from a STEP Model Returns False (and writes no file) if <ctx> does not bring a STEP Model. | |
virtual Standard_Boolean | CopyModel (const Handle< Interface_InterfaceModel > &original, const Handle< Interface_InterfaceModel > &newmodel, const Interface_EntityIterator &list, Interface_CopyTool &TC) const override |
Performs the copy of entities from an original model to a new one. Works according <copymode> : if True, standard copy is run else nothing is done and returned value is False. | |
virtual void | DumpEntity (const Handle< Interface_InterfaceModel > &model, const Handle< Interface_Protocol > &protocol, const Handle< Standard_Transient > &entity, Standard_OStream &S, const Standard_Integer level) const override |
Dumps an entity under STEP form, i.e. as a part of a Step file Works with a StepDumper. Level 0 just displays type; level 1 displays the entity itself and level 2 displays the entity plus its shared ones (one sub-level : immediately shared entities) | |
![]() | |
virtual Standard_Integer | ReadFile (const Standard_CString name, Handle< Interface_InterfaceModel > &model, const Handle< Interface_Protocol > &protocol) const =0 |
Gives the way to Read a File and transfer it to a Model <mod> is the resulting Model, which has to be created by this method. In case of error, <mod> must be returned Null Return value is a status with free values. Simply, 0 is for "Execution OK" The Protocol can be used to work (e.g. create the Model, read and recognize the Entities) | |
virtual Standard_Integer | ReadStream (const Standard_CString theName, std::istream &theIStream, Handle< Interface_InterfaceModel > &model, const Handle< Interface_Protocol > &protocol) const |
Interface to read a data from the specified stream. | |
virtual Standard_Boolean | WriteFile (IFSelect_ContextWrite &ctx) const =0 |
Gives the way to Write a File from a Model. <ctx> contains all necessary information : the model, the protocol, the file name, and the list of File Modifiers to be applied, also with restricted list of selected entities for each one, if required. In return, it brings the produced check-list. | |
virtual Standard_Boolean | CopyModel (const Handle< Interface_InterfaceModel > &original, const Handle< Interface_InterfaceModel > &newmodel, const Interface_EntityIterator &list, Interface_CopyTool &TC) const |
Performs the copy of entities from an original model to a new one. It must also copy headers if any. Returns True when done. The provided default works by copying the individual entities designated in the list, by using the general service class CopyTool. It can be redefined for a norm which, either implements Copy by another way (do not forget to Bind each copied result with its original entity in TC) and returns True, or does not know how to copy and returns False. | |
virtual void | DumpEntity (const Handle< Interface_InterfaceModel > &model, const Handle< Interface_Protocol > &protocol, const Handle< Standard_Transient > &entity, Standard_OStream &S, const Standard_Integer level) const =0 |
Gives the way of dumping an entity under a form comprehensive for each norm. <model> helps to identify, number ... entities. <level> is to be interpreted for each norm (because of the formats which can be very different) | |
void | DumpEntity (const Handle< Interface_InterfaceModel > &model, const Handle< Interface_Protocol > &protocol, const Handle< Standard_Transient > &entity, Standard_OStream &S) const |
Calls deferred DumpEntity with the recorded default level. | |
void | SetDumpLevels (const Standard_Integer def, const Standard_Integer max) |
Records a default level and a maximum value for level level for DumpEntity can go between 0 and <max> default value will be <def> | |
void | DumpLevels (Standard_Integer &def, Standard_Integer &max) const |
Returns the recorded default and maximum dump levels If none was recorded, max is returned negative, def as zero. | |
void | SetDumpHelp (const Standard_Integer level, const Standard_CString help) |
Records a short line of help for a level (0 - max) | |
Standard_CString | DumpHelp (const Standard_Integer level) const |
Returns the help line recorded for <level>, or an empty string. | |
![]() | |
Standard_Transient () | |
Empty constructor. | |
Standard_Transient (const Standard_Transient &) | |
Copy constructor – does nothing. | |
Standard_Transient & | operator= (const Standard_Transient &) |
Assignment operator, needed to avoid copying reference counter. | |
virtual | ~Standard_Transient () |
Destructor must be virtual. | |
virtual void | Delete () const |
Memory deallocator for transient classes. | |
virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
Returns a type descriptor about this object. | |
Standard_Boolean | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
Returns a true value if this is an instance of Type. | |
Standard_Boolean | IsInstance (const Standard_CString theTypeName) const |
Returns a true value if this is an instance of TypeName. | |
Standard_Boolean | IsKind (const opencascade::handle< Standard_Type > &theType) const |
Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. | |
Standard_Boolean | IsKind (const Standard_CString theTypeName) const |
Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. | |
Standard_Transient * | This () const |
Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. | |
Standard_Integer | GetRefCount () const |
Get the reference counter of this object. | |
void | IncrementRefCounter () const |
Increments the reference counter of this object. | |
Standard_Integer | DecrementRefCounter () const |
Decrements the reference counter of this object; returns the decremented value. | |
Additional Inherited Members | |
![]() | |
typedef void | base_type |
Returns a type descriptor about this object. | |
![]() | |
static const char * | get_type_name () |
Returns a type descriptor about this object. | |
static const opencascade::handle< Standard_Type > & | get_type_descriptor () |
Returns type descriptor of Standard_Transient class. | |
![]() | |
IFSelect_WorkLibrary () | |
Required to initialise fields. | |
Performs Read and Write a STEP File with a STEP Model Following the protocols, Copy may be implemented or not.
StepSelect_WorkLibrary::StepSelect_WorkLibrary | ( | const Standard_Boolean | copymode = Standard_True | ) |
Creates a STEP WorkLibrary <copymode> precises whether Copy is implemented or not.
|
overridevirtual |
Performs the copy of entities from an original model to a new one. Works according <copymode> : if True, standard copy is run else nothing is done and returned value is False.
Reimplemented from IFSelect_WorkLibrary.
|
overridevirtual |
Dumps an entity under STEP form, i.e. as a part of a Step file Works with a StepDumper. Level 0 just displays type; level 1 displays the entity itself and level 2 displays the entity plus its shared ones (one sub-level : immediately shared entities)
Implements IFSelect_WorkLibrary.
|
overridevirtual |
Reads a STEP File and returns a STEP Model (into <mod>), or lets <mod> "Null" in case of Error Returns 0 if OK, 1 if Read Error, -1 if File not opened.
Implements IFSelect_WorkLibrary.
|
overridevirtual |
Reads a STEP File from stream and returns a STEP Model (into <mod>), or lets <mod> "Null" in case of Error Returns 0 if OK, 1 if Read Error, -1 if File not opened.
Reimplemented from IFSelect_WorkLibrary.
void StepSelect_WorkLibrary::SetDumpLabel | ( | const Standard_Integer | mode | ) |
Selects a mode to dump entities 0 (D) : prints numbers, then displays table number/label 1 : prints labels, then displays table label/number 2 : prints labels onky.
|
overridevirtual |
Writes a File from a STEP Model Returns False (and writes no file) if <ctx> does not bring a STEP Model.
Implements IFSelect_WorkLibrary.