Open CASCADE Technology  6.9.0
Public Member Functions

StepData_StepReaderTool Class Reference

Specific FileReaderTool for Step; works with FileReaderData provides references evaluation, plus access to litteral data and specific methods defined by FileReaderTool Remarks : works with a ReaderLib to load Entities. More...

#include <StepData_StepReaderTool.hxx>

Inheritance diagram for StepData_StepReaderTool:
Inheritance graph
[legend]

Public Member Functions

 StepData_StepReaderTool (const Handle< StepData_StepReaderData > &reader, const Handle< StepData_Protocol > &protocol)
 creates StepReaderTool to work with a StepReaderData according to a Step Protocol. Defines the ReaderLib at this time More...
 
void Prepare (const Standard_Boolean optimize=Standard_True)
 Bounds empty entities to records, uses default Recognition provided by ReaderLib and ReaderModule. Also calls computation of references (SetEntityNumbers from StepReaderData) Works only on data entities (skips header) <optimize> given False allows to test some internal algorithms which are normally avoided (see also StepReaderData) More...
 
void Prepare (const Handle< StepData_FileRecognizer > &reco, const Standard_Boolean optimize=Standard_True)
 Bounds empty entities to records, works with a specific FileRecognizer, stored and later used in Recognize Works only on data entities (skips header) <optimize : same as above. More...
 
Standard_Boolean Recognize (const Standard_Integer num, Handle< Interface_Check > &ach, Handle< Standard_Transient > &ent)
 recognizes records, by asking either ReaderLib (default) or FileRecognizer (if defined) to do so. <ach> is to call RecognizeByLib More...
 
void PrepareHeader (const Handle< StepData_FileRecognizer > &reco)
 bounds empty entities and sub-lists to header records works like Prepare + SetEntityNumbers, but for header (N.B.: in Header, no Ident and no reference) FileRecognizer is to specify Entities which are allowed to be defined in the Header (not every type can be) More...
 
void BeginRead (const Handle< Interface_InterfaceModel > &amodel)
 fills model's header; that is, gives to it Header entities and commands their loading. Also fills StepModel's Global Check from StepReaderData's GlobalCheck More...
 
Standard_Boolean AnalyseRecord (const Standard_Integer num, const Handle< Standard_Transient > &anent, Handle< Interface_Check > &acheck)
 fills an entity, given record no; works by using a ReaderLib to load each entity, which must be a Transient Actually, returned value is True if no fail, False else More...
 
virtual void EndRead (const Handle< Interface_InterfaceModel > &amodel)
 Ends file reading after reading all the entities Here, it binds in the model, Idents to Entities (for checks) More...
 
- Public Member Functions inherited from Interface_FileReaderTool
void SetData (const Handle< Interface_FileReaderData > &reader, const Handle< Interface_Protocol > &protocol)
 Sets Data to a FileReaderData. Works with a Protocol. More...
 
Handle< Interface_ProtocolProtocol () const
 Returns the Protocol given at creation time. More...
 
Handle< Interface_FileReaderDataData () const
 Returns the FileReaderData which is used to work. More...
 
void SetModel (const Handle< Interface_InterfaceModel > &amodel)
 Stores a Model. Used when the Model has been loaded. More...
 
Handle< Interface_InterfaceModelModel () const
 Returns the stored Model. More...
 
void SetMessenger (const Handle< Message_Messenger > &messenger)
 Sets Messenger used for outputting messages. More...
 
Handle< Message_MessengerMessenger () const
 Returns Messenger used for outputting messages. The returned object is guaranteed to be non-null; default is Message::Messenger(). More...
 
void SetTraceLevel (const Standard_Integer tracelev)
 Sets trace level used for outputting messages. More...
 
Standard_Integer TraceLevel () const
 Returns trace level used for outputting messages. More...
 
void SetErrorHandle (const Standard_Boolean err)
 Allows controlling whether exception raisings are handled If err is False, they are not (hence, dbx can take control) If err is True, they are, and they are traced (by putting on messenger Entity's Number and file record num) Default given at Model's creation time is True. More...
 
Standard_Boolean ErrorHandle () const
 Returns ErrorHandle flag. More...
 
void SetEntities ()
 Fills records with empty entities; once done, each entity can ask the FileReaderTool for any entity referenced through an identifier. Calls Recognize which is specific to each specific type of FileReaderTool. More...
 
Standard_Boolean RecognizeByLib (const Standard_Integer num, Interface_GeneralLib &glib, Interface_ReaderLib &rlib, Handle< Interface_Check > &ach, Handle< Standard_Transient > &ent) const
 Recognizes a record with the help of Libraries. Can be used to implement the method Recognize. <rlib> is used to find Protocol and CaseNumber to apply <glib> performs the creation (by service NewVoid, or NewRead if NewVoid gave no result) <ach> is a check, which is transmitted to NewRead if it is called, gives a result but which is false <ent> is the result Returns False if recognition has failed, True else. More...
 
Handle< Standard_TransientUnknownEntity () const
 Provides an unknown entity, specific to the Interface called by SetEntities when Recognize has failed (Unknown alone) or by LoadModel when an Entity has caused a Fail on reading (to keep at least its literal description) Uses Protocol to do it. More...
 
Handle< Interface_InterfaceModelNewModel () const
 Creates an empty Model of the norm. Uses Protocol to do it. More...
 
void LoadModel (const Handle< Interface_InterfaceModel > &amodel)
 Reads and fills Entities from the FileReaderData set by SetData to an InterfaceModel. It enchains required operations, the specific ones correspond to deferred methods (below) to be defined for each Norm. It manages also error recovery and trace. Remark : it calls SetModel. It Can raise any error which can occur during a load operation, unless Error Handling is set. This method can also be redefined if judged necessary. More...
 
Handle< Standard_TransientLoadedEntity (const Standard_Integer num)
 Reads, Fills and Returns one Entity read from a Record of the FileReaderData. This Method manages also case of Fail or Warning, by producing a ReportEntyty plus , for a Fail, a literal Content (as an UnknownEntity). Performs also Trace. More...
 
virtual void Destroy ()
 
virtual ~Interface_FileReaderTool ()
 
void Clear ()
 Clear filelds. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Interface_FileReaderTool
 Interface_FileReaderTool ()
 Constructor; sets default fields. More...
 

Detailed Description

Specific FileReaderTool for Step; works with FileReaderData provides references evaluation, plus access to litteral data and specific methods defined by FileReaderTool Remarks : works with a ReaderLib to load Entities.

Constructor & Destructor Documentation

StepData_StepReaderTool::StepData_StepReaderTool ( const Handle< StepData_StepReaderData > &  reader,
const Handle< StepData_Protocol > &  protocol 
)

creates StepReaderTool to work with a StepReaderData according to a Step Protocol. Defines the ReaderLib at this time

Member Function Documentation

Standard_Boolean StepData_StepReaderTool::AnalyseRecord ( const Standard_Integer  num,
const Handle< Standard_Transient > &  anent,
Handle< Interface_Check > &  acheck 
)
virtual

fills an entity, given record no; works by using a ReaderLib to load each entity, which must be a Transient Actually, returned value is True if no fail, False else

Implements Interface_FileReaderTool.

void StepData_StepReaderTool::BeginRead ( const Handle< Interface_InterfaceModel > &  amodel)
virtual

fills model's header; that is, gives to it Header entities and commands their loading. Also fills StepModel's Global Check from StepReaderData's GlobalCheck

Implements Interface_FileReaderTool.

virtual void StepData_StepReaderTool::EndRead ( const Handle< Interface_InterfaceModel > &  amodel)
virtual

Ends file reading after reading all the entities Here, it binds in the model, Idents to Entities (for checks)

Reimplemented from Interface_FileReaderTool.

void StepData_StepReaderTool::Prepare ( const Standard_Boolean  optimize = Standard_True)

Bounds empty entities to records, uses default Recognition provided by ReaderLib and ReaderModule. Also calls computation of references (SetEntityNumbers from StepReaderData) Works only on data entities (skips header) <optimize> given False allows to test some internal algorithms which are normally avoided (see also StepReaderData)

void StepData_StepReaderTool::Prepare ( const Handle< StepData_FileRecognizer > &  reco,
const Standard_Boolean  optimize = Standard_True 
)

Bounds empty entities to records, works with a specific FileRecognizer, stored and later used in Recognize Works only on data entities (skips header) <optimize : same as above.

void StepData_StepReaderTool::PrepareHeader ( const Handle< StepData_FileRecognizer > &  reco)

bounds empty entities and sub-lists to header records works like Prepare + SetEntityNumbers, but for header (N.B.: in Header, no Ident and no reference) FileRecognizer is to specify Entities which are allowed to be defined in the Header (not every type can be)

Standard_Boolean StepData_StepReaderTool::Recognize ( const Standard_Integer  num,
Handle< Interface_Check > &  ach,
Handle< Standard_Transient > &  ent 
)
virtual

recognizes records, by asking either ReaderLib (default) or FileRecognizer (if defined) to do so. <ach> is to call RecognizeByLib

Implements Interface_FileReaderTool.


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