OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    TransferBRep_Reader Class Reference

    This class offers a simple, easy to call, way of transferring data from interface files to Shapes from CasCade It must be specialized according to each norm/protocol, by : More...

    #include <TransferBRep_Reader.hxx>

    Public Member Functions

     TransferBRep_Reader ()
     Initializes a non-specialised Reader. Typically, for each norm or protocol, is will be required to define a specific Create to load a file and transfer it.
    void SetProtocol (const occ::handle< Interface_Protocol > &protocol)
     Records the protocol to be used for read and transfer roots.
    virtual occ::handle< Interface_Protocol > Protocol () const
     Returns the recorded Protocol.
    void SetActor (const occ::handle< Transfer_ActorOfTransientProcess > &actor)
     Records the actor to be used for transfers.
    virtual occ::handle< Transfer_ActorOfTransientProcess > Actor () const
     Returns the recorded Actor.
    void SetFileStatus (const int status)
     Sets File Status to be interpreted as follows : = 0 OK < 0 file not found.
    int FileStatus () const
     Returns the File Status.
    bool FileNotFound () const
     Returns True if FileStatus is for FileNotFound.
    bool SyntaxError () const
     Returns True if FileStatus is for Error during read (major error; for local error, see CheckModel).
    void SetModel (const occ::handle< Interface_InterfaceModel > &model)
     Specifies a Model to work on Also clears the result and Done status.
    occ::handle< Interface_InterfaceModel > Model () const
     Returns the Model to be worked on.
    void Clear ()
     clears the result and Done status. But not the Model.
    bool CheckStatusModel (const bool withprint) const
     Checks the Model. Returns True if there is NO FAIL at all (regardless Warnings) If <withprint> is True, also sends Checks on standard output.
    Interface_CheckIterator CheckListModel () const
     Checks the Model (complete : syntax + semantic) and returns the produced Check List.
    bool & ModeNewTransfer ()
     Returns (by Reference, hence can be changed) the Mode for new Transfer : True (D) means that each new Transfer produces a new TransferProcess. Else keeps the original one but each Transfer clears its (former results are not kept).
    bool BeginTransfer ()
     Initializes the Reader for a Transfer (one,roots, or list) Also calls PrepareTransfer Returns True when done, False if could not be done.
    void EndTransfer ()
     Ebds a Transfer (one, roots or list) by recording its result.
    virtual void PrepareTransfer ()
     Prepares the Transfer. Also can act on the Actor or change the TransientProcess if required. Should not set the Actor into the TransientProcess, it is done by caller. The provided default does nothing.
    virtual void TransferRoots (const Message_ProgressRange &theProgress=Message_ProgressRange())
     Transfers all Root Entities which are recognized as Geom-Topol The result will be a list of Shapes. This method calls user redefinable PrepareTransfer Remark : former result is cleared.
    virtual bool Transfer (const int numnum, const Message_ProgressRange &theProgress=Message_ProgressRange())
     Transfers an Entity given its rank in the Model (Root or not) Returns True if it is recognized as Geom-Topol. (But it can have failed : see IsDone).
    virtual void TransferList (const occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > &list, const Message_ProgressRange &theProgress=Message_ProgressRange())
     Transfers a list of Entities (only the ones also in the Model) Remark : former result is cleared.
    bool IsDone () const
     Returns True if the LAST Transfer/TransferRoots was a success.
    int NbShapes () const
     Returns the count of produced Shapes (roots).
    occ::handle< NCollection_HSequence< TopoDS_Shape > > Shapes () const
     Returns the complete list of produced Shapes.
    const TopoDS_Shape & Shape (const int numnum=1) const
     Returns a Shape given its rank, by default the first one.
    TopoDS_Shape ShapeResult (const occ::handle< Standard_Transient > &ent) const
     Returns a Shape produced from a given entity (if it was individually transferred or if an intermediate result is known). If no Shape is bound with <ent>, returns a Null Shape Warning : Runs on the last call to Transfer,TransferRoots,TransferList.
    TopoDS_Shape OneShape () const
     Returns a unique Shape for the result :
    int NbTransients () const
     Returns the count of produced Transient Results (roots).
    occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > Transients () const
     Returns the complete list of produced Transient Results.
    occ::handle< Standard_Transient > Transient (const int numnum=1) const
     Returns a Transient Root Result, given its rank (by default the first one).
    bool CheckStatusResult (const bool withprints) const
     Checks the Result of last Transfer (individual or roots, no cumulation on several transfers). Returns True if NO fail occurred during Transfer (queries the TransientProcess).
    Interface_CheckIterator CheckListResult () const
     Checks the Result of last Transfer (individual or roots, no cumulation on several transfers) and returns the produced list.
    occ::handle< Transfer_TransientProcess > TransientProcess () const
     Returns the TransientProcess. It records information about the very last transfer done. Null if no transfer yet done. Can be used for queries more accurate than the default ones.
    virtual ~TransferBRep_Reader ()

    Protected Attributes

    bool theDone
    occ::handle< Transfer_TransientProcess > theProc

    Detailed Description

    This class offers a simple, easy to call, way of transferring data from interface files to Shapes from CasCade It must be specialized according to each norm/protocol, by :

    • defining how to read a file (specific method with protocol)
    • definig transfer, by providing an Actor

    Constructor & Destructor Documentation

    ◆ TransferBRep_Reader()

    TransferBRep_Reader::TransferBRep_Reader ( )

    Initializes a non-specialised Reader. Typically, for each norm or protocol, is will be required to define a specific Create to load a file and transfer it.

    ◆ ~TransferBRep_Reader()

    virtual TransferBRep_Reader::~TransferBRep_Reader ( )
    virtual

    Member Function Documentation

    ◆ Actor()

    virtual occ::handle< Transfer_ActorOfTransientProcess > TransferBRep_Reader::Actor ( ) const
    virtual

    Returns the recorded Actor.

    ◆ BeginTransfer()

    bool TransferBRep_Reader::BeginTransfer ( )

    Initializes the Reader for a Transfer (one,roots, or list) Also calls PrepareTransfer Returns True when done, False if could not be done.

    ◆ CheckListModel()

    Interface_CheckIterator TransferBRep_Reader::CheckListModel ( ) const

    Checks the Model (complete : syntax + semantic) and returns the produced Check List.

    ◆ CheckListResult()

    Interface_CheckIterator TransferBRep_Reader::CheckListResult ( ) const

    Checks the Result of last Transfer (individual or roots, no cumulation on several transfers) and returns the produced list.

    ◆ CheckStatusModel()

    bool TransferBRep_Reader::CheckStatusModel ( const bool withprint) const

    Checks the Model. Returns True if there is NO FAIL at all (regardless Warnings) If <withprint> is True, also sends Checks on standard output.

    ◆ CheckStatusResult()

    bool TransferBRep_Reader::CheckStatusResult ( const bool withprints) const

    Checks the Result of last Transfer (individual or roots, no cumulation on several transfers). Returns True if NO fail occurred during Transfer (queries the TransientProcess).

    ◆ Clear()

    void TransferBRep_Reader::Clear ( )

    clears the result and Done status. But not the Model.

    ◆ EndTransfer()

    void TransferBRep_Reader::EndTransfer ( )

    Ebds a Transfer (one, roots or list) by recording its result.

    ◆ FileNotFound()

    bool TransferBRep_Reader::FileNotFound ( ) const

    Returns True if FileStatus is for FileNotFound.

    ◆ FileStatus()

    int TransferBRep_Reader::FileStatus ( ) const

    Returns the File Status.

    ◆ IsDone()

    bool TransferBRep_Reader::IsDone ( ) const

    Returns True if the LAST Transfer/TransferRoots was a success.

    ◆ Model()

    occ::handle< Interface_InterfaceModel > TransferBRep_Reader::Model ( ) const

    Returns the Model to be worked on.

    ◆ ModeNewTransfer()

    bool & TransferBRep_Reader::ModeNewTransfer ( )

    Returns (by Reference, hence can be changed) the Mode for new Transfer : True (D) means that each new Transfer produces a new TransferProcess. Else keeps the original one but each Transfer clears its (former results are not kept).

    ◆ NbShapes()

    int TransferBRep_Reader::NbShapes ( ) const

    Returns the count of produced Shapes (roots).

    ◆ NbTransients()

    int TransferBRep_Reader::NbTransients ( ) const

    Returns the count of produced Transient Results (roots).

    ◆ OneShape()

    TopoDS_Shape TransferBRep_Reader::OneShape ( ) const

    Returns a unique Shape for the result :

    • a void Shape (type = SHAPE) if result is empty
    • a simple Shape if result has only one : returns this one
    • a Compound if result has more than one Shape

    ◆ PrepareTransfer()

    virtual void TransferBRep_Reader::PrepareTransfer ( )
    virtual

    Prepares the Transfer. Also can act on the Actor or change the TransientProcess if required. Should not set the Actor into the TransientProcess, it is done by caller. The provided default does nothing.

    ◆ Protocol()

    virtual occ::handle< Interface_Protocol > TransferBRep_Reader::Protocol ( ) const
    virtual

    Returns the recorded Protocol.

    ◆ SetActor()

    void TransferBRep_Reader::SetActor ( const occ::handle< Transfer_ActorOfTransientProcess > & actor)

    Records the actor to be used for transfers.

    ◆ SetFileStatus()

    void TransferBRep_Reader::SetFileStatus ( const int status)

    Sets File Status to be interpreted as follows : = 0 OK < 0 file not found.

    0 read error, no Model could be created

    ◆ SetModel()

    void TransferBRep_Reader::SetModel ( const occ::handle< Interface_InterfaceModel > & model)

    Specifies a Model to work on Also clears the result and Done status.

    ◆ SetProtocol()

    void TransferBRep_Reader::SetProtocol ( const occ::handle< Interface_Protocol > & protocol)

    Records the protocol to be used for read and transfer roots.

    ◆ Shape()

    const TopoDS_Shape & TransferBRep_Reader::Shape ( const int num = 1) const

    Returns a Shape given its rank, by default the first one.

    ◆ ShapeResult()

    TopoDS_Shape TransferBRep_Reader::ShapeResult ( const occ::handle< Standard_Transient > & ent) const

    Returns a Shape produced from a given entity (if it was individually transferred or if an intermediate result is known). If no Shape is bound with <ent>, returns a Null Shape Warning : Runs on the last call to Transfer,TransferRoots,TransferList.

    ◆ Shapes()

    occ::handle< NCollection_HSequence< TopoDS_Shape > > TransferBRep_Reader::Shapes ( ) const

    Returns the complete list of produced Shapes.

    ◆ SyntaxError()

    bool TransferBRep_Reader::SyntaxError ( ) const

    Returns True if FileStatus is for Error during read (major error; for local error, see CheckModel).

    ◆ Transfer()

    virtual bool TransferBRep_Reader::Transfer ( const int num,
    const Message_ProgressRange & theProgress = Message_ProgressRange() )
    virtual

    Transfers an Entity given its rank in the Model (Root or not) Returns True if it is recognized as Geom-Topol. (But it can have failed : see IsDone).

    ◆ TransferList()

    virtual void TransferBRep_Reader::TransferList ( const occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > & list,
    const Message_ProgressRange & theProgress = Message_ProgressRange() )
    virtual

    Transfers a list of Entities (only the ones also in the Model) Remark : former result is cleared.

    ◆ TransferRoots()

    virtual void TransferBRep_Reader::TransferRoots ( const Message_ProgressRange & theProgress = Message_ProgressRange())
    virtual

    Transfers all Root Entities which are recognized as Geom-Topol The result will be a list of Shapes. This method calls user redefinable PrepareTransfer Remark : former result is cleared.

    ◆ Transient()

    occ::handle< Standard_Transient > TransferBRep_Reader::Transient ( const int num = 1) const

    Returns a Transient Root Result, given its rank (by default the first one).

    ◆ TransientProcess()

    occ::handle< Transfer_TransientProcess > TransferBRep_Reader::TransientProcess ( ) const

    Returns the TransientProcess. It records information about the very last transfer done. Null if no transfer yet done. Can be used for queries more accurate than the default ones.

    ◆ Transients()

    occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > TransferBRep_Reader::Transients ( ) const

    Returns the complete list of produced Transient Results.

    Field Documentation

    ◆ theDone

    bool TransferBRep_Reader::theDone
    protected

    ◆ theProc

    occ::handle<Transfer_TransientProcess> TransferBRep_Reader::theProc
    protected

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