![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
Specific FileReaderTool for Step; works with FileReaderData provides references evaluation, plus access to literal data and specific methods defined by FileReaderTool Remarks : works with a ReaderLib to load Entities. More...
#include <StepData_StepReaderTool.hxx>

Public Member Functions | |
| StepData_StepReaderTool (const occ::handle< StepData_StepReaderData > &reader, const occ::handle< StepData_Protocol > &protocol) | |
| creates StepReaderTool to work with a StepReaderData according to a Step Protocol. Defines the ReaderLib at this time | |
| void | Prepare (const bool optimize=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 | Prepare (const occ::handle< StepData_FileRecognizer > &reco, const bool optimize=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. | |
| bool | Recognize (const int num, occ::handle< Interface_Check > &ach, occ::handle< Standard_Transient > &ent) override |
| recognizes records, by asking either ReaderLib (default) or FileRecognizer (if defined) to do so. <ach> is to call RecognizeByLib | |
| void | PrepareHeader (const occ::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) | |
| void | BeginRead (const occ::handle< Interface_InterfaceModel > &amodel) override |
| 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 | |
| bool | AnalyseRecord (const int num, const occ::handle< Standard_Transient > &anent, occ::handle< Interface_Check > &acheck) override |
| 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 | |
| void | EndRead (const occ::handle< Interface_InterfaceModel > &amodel) override |
| Ends file reading after reading all the entities Here, it binds in the model, Idents to Entities (for checks) | |
Public Member Functions inherited from Interface_FileReaderTool | |
| void | SetData (const occ::handle< Interface_FileReaderData > &reader, const occ::handle< Interface_Protocol > &protocol) |
| Sets Data to a FileReaderData. Works with a Protocol. | |
| occ::handle< Interface_Protocol > | Protocol () const |
| Returns the Protocol given at creation time. | |
| occ::handle< Interface_FileReaderData > | Data () const |
| Returns the FileReaderData which is used to work. | |
| void | SetModel (const occ::handle< Interface_InterfaceModel > &amodel) |
| Stores a Model. Used when the Model has been loaded. | |
| occ::handle< Interface_InterfaceModel > | Model () const |
| Returns the stored Model. | |
| void | SetMessenger (const occ::handle< Message_Messenger > &messenger) |
| Sets Messenger used for outputting messages. | |
| occ::handle< Message_Messenger > | Messenger () const |
| Returns Messenger used for outputting messages. The returned object is guaranteed to be non-null; default is Message::Messenger(). | |
| void | SetTraceLevel (const int tracelev) |
| Sets trace level used for outputting messages. | |
| int | TraceLevel () const |
| Returns trace level used for outputting messages. | |
| void | SetErrorHandle (const bool 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. | |
| bool | ErrorHandle () const |
| Returns ErrorHandle flag. | |
| 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. | |
| bool | RecognizeByLib (const int num, Interface_GeneralLib &glib, Interface_ReaderLib &rlib, occ::handle< Interface_Check > &ach, occ::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. | |
| occ::handle< Standard_Transient > | UnknownEntity () 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. | |
| occ::handle< Interface_InterfaceModel > | NewModel () const |
| Creates an empty Model of the norm. Uses Protocol to do it. | |
| void | LoadModel (const occ::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. | |
| occ::handle< Standard_Transient > | LoadedEntity (const int 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. | |
| virtual | ~Interface_FileReaderTool () |
| void | Clear () |
| Clear fields. | |
Additional Inherited Members | |
Protected Member Functions inherited from Interface_FileReaderTool | |
| Interface_FileReaderTool () | |
| Constructor; sets default fields. | |
Specific FileReaderTool for Step; works with FileReaderData provides references evaluation, plus access to literal data and specific methods defined by FileReaderTool Remarks : works with a ReaderLib to load Entities.
| StepData_StepReaderTool::StepData_StepReaderTool | ( | const occ::handle< StepData_StepReaderData > & | reader, |
| const occ::handle< StepData_Protocol > & | protocol ) |
creates StepReaderTool to work with a StepReaderData according to a Step Protocol. Defines the ReaderLib at this time
|
overridevirtual |
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.
|
overridevirtual |
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.
|
overridevirtual |
Ends file reading after reading all the entities Here, it binds in the model, Idents to Entities (for checks)
Reimplemented from Interface_FileReaderTool.
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 occ::handle< StepData_FileRecognizer > & | reco, |
| const bool | optimize = 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 occ::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)
|
overridevirtual |
recognizes records, by asking either ReaderLib (default) or FileRecognizer (if defined) to do so. <ach> is to call RecognizeByLib
Implements Interface_FileReaderTool.