specific FileReaderTool for IGES Parameters are accessed through specific objects, ParamReaders More...
#include <IGESData_IGESReaderTool.hxx>

Public Member Functions | |
| IGESData_IGESReaderTool (const occ::handle< IGESData_IGESReaderData > &reader, const occ::handle< IGESData_Protocol > &protocol) | |
| creates IGESReaderTool to work with an IGESReaderData and an IGES Protocol. Actually, no Lib is used | |
| void | Prepare (const occ::handle< IGESData_FileRecognizer > &reco) |
| binds empty entities to records, works with the Protocol (from IGESData) stored and later used RQ : Actually, sets DNum into IGES Entities Also loads the list of parameters for ParamReader | |
| bool | Recognize (const int numnum, occ::handle< Interface_Check > &ach, occ::handle< Standard_Transient > &ent) override |
| recognizes records by asking Protocol (on data of DirType) | |
| void | BeginRead (const occ::handle< Interface_InterfaceModel > &amodel) override |
| fills model's header, that is, its GlobalSection | |
| bool | AnalyseRecord (const int numnum, const occ::handle< Standard_Transient > &anent, occ::handle< Interface_Check > &acheck) override |
| fills an entity, given record no; works by calling ReadDirPart then ReadParams (with help of a ParamReader), then if required ReadProps and ReadAssocs, from IGESEntity Returns True if no fail has been recorded | |
| void | EndRead (const occ::handle< Interface_InterfaceModel > &amodel) override |
| after reading entities, true line weights can be computed | |
| void | ReadDir (const occ::handle< IGESData_IGESEntity > &ent, const occ::handle< IGESData_IGESReaderData > &IR, const IGESData_DirPart &DP, occ::handle< Interface_Check > &ach) const |
| Reads directory part components from file; DP is the literal directory part, IR detains entities referenced by DP. | |
| void | ReadOwnParams (const occ::handle< IGESData_IGESEntity > &ent, const occ::handle< IGESData_IGESReaderData > &IR, IGESData_ParamReader &PR) const |
| Performs Reading of own Parameters for each IGESEntity Works with the ReaderLib loaded with ReadWriteModules for IGES In case of failure, tries UndefinedEntity from IGES. | |
| void | ReadProps (const occ::handle< IGESData_IGESEntity > &ent, const occ::handle< IGESData_IGESReaderData > &IR, IGESData_ParamReader &PR) const |
| Reads Property List, if there is (if not, does nothing) criterium is : current parameter of PR remains inside params list, and Stage is "Own" Current parameter must be a positive integer, which value gives the length of the list; else, a Fail is produced (into Check of PR) and reading process is stopped. | |
| void | ReadAssocs (const occ::handle< IGESData_IGESEntity > &ent, const occ::handle< IGESData_IGESReaderData > &IR, IGESData_ParamReader &PR) const |
| Reads Associativity List, if there is (if not, does nothing) criterium is : current parameter of PR remains inside params list, and Stage is "Own" Same conditions as above; in addition, no parameter must be let after the list once read Note that "Associated" entities are not declared "Shared". | |
| 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 numnum, 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 numnum) |
| 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 IGES Parameters are accessed through specific objects, ParamReaders
| IGESData_IGESReaderTool::IGESData_IGESReaderTool | ( | const occ::handle< IGESData_IGESReaderData > & | reader, |
| const occ::handle< IGESData_Protocol > & | protocol ) |
creates IGESReaderTool to work with an IGESReaderData and an IGES Protocol. Actually, no Lib is used
|
overridevirtual |
fills an entity, given record no; works by calling ReadDirPart then ReadParams (with help of a ParamReader), then if required ReadProps and ReadAssocs, from IGESEntity Returns True if no fail has been recorded
Implements Interface_FileReaderTool.
|
overridevirtual |
fills model's header, that is, its GlobalSection
Implements Interface_FileReaderTool.
|
overridevirtual |
after reading entities, true line weights can be computed
Reimplemented from Interface_FileReaderTool.
| void IGESData_IGESReaderTool::Prepare | ( | const occ::handle< IGESData_FileRecognizer > & | reco | ) |
binds empty entities to records, works with the Protocol (from IGESData) stored and later used RQ : Actually, sets DNum into IGES Entities Also loads the list of parameters for ParamReader
| void IGESData_IGESReaderTool::ReadAssocs | ( | const occ::handle< IGESData_IGESEntity > & | ent, |
| const occ::handle< IGESData_IGESReaderData > & | IR, | ||
| IGESData_ParamReader & | PR ) const |
Reads Associativity List, if there is (if not, does nothing) criterium is : current parameter of PR remains inside params list, and Stage is "Own" Same conditions as above; in addition, no parameter must be let after the list once read Note that "Associated" entities are not declared "Shared".
| void IGESData_IGESReaderTool::ReadDir | ( | const occ::handle< IGESData_IGESEntity > & | ent, |
| const occ::handle< IGESData_IGESReaderData > & | IR, | ||
| const IGESData_DirPart & | DP, | ||
| occ::handle< Interface_Check > & | ach ) const |
Reads directory part components from file; DP is the literal directory part, IR detains entities referenced by DP.
| void IGESData_IGESReaderTool::ReadOwnParams | ( | const occ::handle< IGESData_IGESEntity > & | ent, |
| const occ::handle< IGESData_IGESReaderData > & | IR, | ||
| IGESData_ParamReader & | PR ) const |
Performs Reading of own Parameters for each IGESEntity Works with the ReaderLib loaded with ReadWriteModules for IGES In case of failure, tries UndefinedEntity from IGES.
| void IGESData_IGESReaderTool::ReadProps | ( | const occ::handle< IGESData_IGESEntity > & | ent, |
| const occ::handle< IGESData_IGESReaderData > & | IR, | ||
| IGESData_ParamReader & | PR ) const |
Reads Property List, if there is (if not, does nothing) criterium is : current parameter of PR remains inside params list, and Stage is "Own" Current parameter must be a positive integer, which value gives the length of the list; else, a Fail is produced (into Check of PR) and reading process is stopped.
|
overridevirtual |
recognizes records by asking Protocol (on data of DirType)
Implements Interface_FileReaderTool.