OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    IFSelect_ContextWrite Class Reference

    This class gathers various information used by File Modifiers apart from the writer object, which is specific of the norm and of the physical format. More...

    #include <IFSelect_ContextWrite.hxx>

    Public Member Functions

     IFSelect_ContextWrite (const occ::handle< Interface_InterfaceModel > &model, const occ::handle< Interface_Protocol > &proto, const occ::handle< IFSelect_AppliedModifiers > &applieds, const char *const filename)
     Prepares a ContextWrite with these information :
     IFSelect_ContextWrite (const occ::handle< Interface_HGraph > &hgraph, const occ::handle< Interface_Protocol > &proto, const occ::handle< IFSelect_AppliedModifiers > &applieds, const char *const filename)
     Same as above but with an already computed Graph.
    occ::handle< Interface_InterfaceModel > Model () const
     Returns the Model.
    occ::handle< Interface_Protocol > Protocol () const
     Returns the Protocol;.
    const char * FileName () const
     Returns the File Name.
    occ::handle< IFSelect_AppliedModifiers > AppliedModifiers () const
     Returns the object AppliedModifiers.
    const Interface_Graph & Graph ()
     Returns the Graph, either given when created, else created the first time it is queried.
    int NbModifiers () const
     Returns the count of recorded File Modifiers.
    bool SetModifier (const int numod)
     Sets active the File Modifier n0 <numod> Then, it prepares the list of entities to consider, if any Returns False if <numod> out of range.
    occ::handle< IFSelect_GeneralModifier > FileModifier () const
     Returns the currently active File Modifier. Cast to be done Null if not properly set : must be test IsNull after casting.
    bool IsForNone () const
     Returns True if no modifier is currently set.
    bool IsForAll () const
     Returns True if the current modifier is to be applied to the whole model. Else, a restricted list of selected entities is defined, it can be exploited by the File Modifier.
    int NbEntities () const
     Returns the total count of selected entities.
    void Start ()
     Starts an iteration on selected items. It takes into account IsForAll/IsForNone, by really iterating on all selected items.
    bool More () const
     Returns True until the iteration has finished.
    void Next ()
     Advances the iteration.
    occ::handle< Standard_Transient > Value () const
     Returns the current selected entity in the model.
    void AddCheck (const occ::handle< Interface_Check > &check)
     Adds a Check to the CheckList. If it is empty, nothing is done If it concerns an Entity from the Model (by SetEntity) to which another Check is attached, it is merged to it. Else, it is added or merged as to GlobalCheck.
    void AddWarning (const occ::handle< Standard_Transient > &startstart, const char *const mess, const char *const orig="")
     Adds a Warning Message for an Entity from the Model If <start> is not an Entity from the model (e.g. the model itself) this message is added to Global Check.
    void AddFail (const occ::handle< Standard_Transient > &startstart, const char *const mess, const char *const orig="")
     Adds a Fail Message for an Entity from the Model If <start> is not an Entity from the model (e.g. the model itself) this message is added to Global Check.
    occ::handle< Interface_Check > CCheck (const int numnum=0)
     Returns a Check given an Entity number (in the Model) by default a Global Check. Creates it the first time. It can then be acknowledged on the spot, in condition that the caller works by reference ("Interface_Check& check = ...").
    occ::handle< Interface_Check > CCheck (const occ::handle< Standard_Transient > &startstart)
     Returns a Check attached to an Entity from the Model It can then be acknowledged on the spot, in condition that the caller works by reference ("Interface_Check& check = ...").
    Interface_CheckIterator CheckList () const
     Returns the complete CheckList.

    Detailed Description

    This class gathers various information used by File Modifiers apart from the writer object, which is specific of the norm and of the physical format.

    These information are controlled by an object AppliedModifiers (if it is not defined, no modification is allowed on writing)

    Furthermore, in return, ContextModif can record Checks, either one for all, or one for each Entity. It supports trace too.

    Constructor & Destructor Documentation

    ◆ IFSelect_ContextWrite() [1/2]

    IFSelect_ContextWrite::IFSelect_ContextWrite ( const occ::handle< Interface_InterfaceModel > & model,
    const occ::handle< Interface_Protocol > & proto,
    const occ::handle< IFSelect_AppliedModifiers > & applieds,
    const char *const filename )

    Prepares a ContextWrite with these information :

    • the model which is to be written
    • the protocol to be used
    • the filename
    • an object AppliedModifiers to work. It gives a list of FileModifiers to be ran, and for each one it can give a restricted list of entities (in the model), else all the model is considered

    ◆ IFSelect_ContextWrite() [2/2]

    IFSelect_ContextWrite::IFSelect_ContextWrite ( const occ::handle< Interface_HGraph > & hgraph,
    const occ::handle< Interface_Protocol > & proto,
    const occ::handle< IFSelect_AppliedModifiers > & applieds,
    const char *const filename )

    Same as above but with an already computed Graph.

    Member Function Documentation

    ◆ AddCheck()

    void IFSelect_ContextWrite::AddCheck ( const occ::handle< Interface_Check > & check)

    Adds a Check to the CheckList. If it is empty, nothing is done If it concerns an Entity from the Model (by SetEntity) to which another Check is attached, it is merged to it. Else, it is added or merged as to GlobalCheck.

    ◆ AddFail()

    void IFSelect_ContextWrite::AddFail ( const occ::handle< Standard_Transient > & start,
    const char *const mess,
    const char *const orig = "" )

    Adds a Fail Message for an Entity from the Model If <start> is not an Entity from the model (e.g. the model itself) this message is added to Global Check.

    ◆ AddWarning()

    void IFSelect_ContextWrite::AddWarning ( const occ::handle< Standard_Transient > & start,
    const char *const mess,
    const char *const orig = "" )

    Adds a Warning Message for an Entity from the Model If <start> is not an Entity from the model (e.g. the model itself) this message is added to Global Check.

    ◆ AppliedModifiers()

    occ::handle< IFSelect_AppliedModifiers > IFSelect_ContextWrite::AppliedModifiers ( ) const

    Returns the object AppliedModifiers.

    ◆ CCheck() [1/2]

    occ::handle< Interface_Check > IFSelect_ContextWrite::CCheck ( const int num = 0)

    Returns a Check given an Entity number (in the Model) by default a Global Check. Creates it the first time. It can then be acknowledged on the spot, in condition that the caller works by reference ("Interface_Check& check = ...").

    ◆ CCheck() [2/2]

    occ::handle< Interface_Check > IFSelect_ContextWrite::CCheck ( const occ::handle< Standard_Transient > & start)

    Returns a Check attached to an Entity from the Model It can then be acknowledged on the spot, in condition that the caller works by reference ("Interface_Check& check = ...").

    ◆ CheckList()

    Interface_CheckIterator IFSelect_ContextWrite::CheckList ( ) const

    Returns the complete CheckList.

    ◆ FileModifier()

    occ::handle< IFSelect_GeneralModifier > IFSelect_ContextWrite::FileModifier ( ) const

    Returns the currently active File Modifier. Cast to be done Null if not properly set : must be test IsNull after casting.

    ◆ FileName()

    const char * IFSelect_ContextWrite::FileName ( ) const

    Returns the File Name.

    ◆ Graph()

    const Interface_Graph & IFSelect_ContextWrite::Graph ( )

    Returns the Graph, either given when created, else created the first time it is queried.

    ◆ IsForAll()

    bool IFSelect_ContextWrite::IsForAll ( ) const

    Returns True if the current modifier is to be applied to the whole model. Else, a restricted list of selected entities is defined, it can be exploited by the File Modifier.

    ◆ IsForNone()

    bool IFSelect_ContextWrite::IsForNone ( ) const

    Returns True if no modifier is currently set.

    ◆ Model()

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

    Returns the Model.

    ◆ More()

    bool IFSelect_ContextWrite::More ( ) const

    Returns True until the iteration has finished.

    ◆ NbEntities()

    int IFSelect_ContextWrite::NbEntities ( ) const

    Returns the total count of selected entities.

    ◆ NbModifiers()

    int IFSelect_ContextWrite::NbModifiers ( ) const

    Returns the count of recorded File Modifiers.

    ◆ Next()

    void IFSelect_ContextWrite::Next ( )

    Advances the iteration.

    ◆ Protocol()

    occ::handle< Interface_Protocol > IFSelect_ContextWrite::Protocol ( ) const

    Returns the Protocol;.

    ◆ SetModifier()

    bool IFSelect_ContextWrite::SetModifier ( const int numod)

    Sets active the File Modifier n0 <numod> Then, it prepares the list of entities to consider, if any Returns False if <numod> out of range.

    ◆ Start()

    void IFSelect_ContextWrite::Start ( )

    Starts an iteration on selected items. It takes into account IsForAll/IsForNone, by really iterating on all selected items.

    ◆ Value()

    occ::handle< Standard_Transient > IFSelect_ContextWrite::Value ( ) const

    Returns the current selected entity in the model.


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