OCCT3D OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    StepData_StepReaderTool Class Reference

    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>

    Inheritance diagram for StepData_StepReaderTool:

    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 numnum, 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 numnum, 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_ProtocolProtocol () const
     Returns the Protocol given at creation time.
    occ::handle< Interface_FileReaderDataData () 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_InterfaceModelModel () const
     Returns the stored Model.
    void SetMessenger (const occ::handle< Message_Messenger > &messenger)
     Sets Messenger used for outputting messages.
    occ::handle< Message_MessengerMessenger () 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_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.
    occ::handle< Interface_InterfaceModelNewModel () 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_TransientLoadedEntity (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.

    Detailed Description

    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.

    Constructor & Destructor Documentation

    ◆ StepData_StepReaderTool()

    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

    Member Function Documentation

    ◆ AnalyseRecord()

    bool StepData_StepReaderTool::AnalyseRecord ( const int num,
    const occ::handle< Standard_Transient > & anent,
    occ::handle< Interface_Check > & acheck )
    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.

    ◆ BeginRead()

    void StepData_StepReaderTool::BeginRead ( const occ::handle< Interface_InterfaceModel > & amodel)
    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.

    ◆ EndRead()

    void StepData_StepReaderTool::EndRead ( const occ::handle< Interface_InterfaceModel > & amodel)
    overridevirtual

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

    Reimplemented from Interface_FileReaderTool.

    ◆ Prepare() [1/2]

    void StepData_StepReaderTool::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).

    ◆ Prepare() [2/2]

    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.

    ◆ PrepareHeader()

    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)

    ◆ Recognize()

    bool StepData_StepReaderTool::Recognize ( const int num,
    occ::handle< Interface_Check > & ach,
    occ::handle< Standard_Transient > & ent )
    overridevirtual

    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: