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
    IFSelect_Activator Class Referenceabstract

    Defines the general frame for working with a SessionPilot. Each Activator treats a set of Commands. Commands are given as alphanumeric strings. They can be of two main forms : More...

    #include <IFSelect_Activator.hxx>

    Inheritance diagram for IFSelect_Activator:

    Public Member Functions

    void Add (const int number, const char *const command) const
     Allows a self-definition by an Activator of the Commands it processes, call the class method Adding (mode 0).
    void AddSet (const int number, const char *const command) const
     Same as Add but specifies that this command is candidate for xset (creation of items, xset : named items; mode 1).
    virtual IFSelect_ReturnStatus Do (const int number, const occ::handle< IFSelect_SessionPilot > &pilot)=0
     Tries to execute a Command Line. <number> is the number of the command for this Activator. It Must forecast to record the result of the execution, for need of Undo-Redo Must Returns : 0 for a void command (not to be recorded), 1 if execution OK, -1 if command incorrect, -2 if error on execution.
    virtual const char * Help (const int number) const =0
     Sends a short help message for a given command identified by it number for this Activator (must take one line max).
    const char * Group () const
    const char * File () const
    void SetForGroup (const char *const groupgroup, const char *const file="")
     Group and SetGroup define a "Group of commands" which correspond to an Activator. Default is "XSTEP" Also a file may be attached.
    Public Member Functions inherited from Standard_Transient
     Standard_Transient ()
     Empty constructor.
     Standard_Transient (const Standard_Transient &)
     Copy constructor – does nothing.
    Standard_Transientoperator= (const Standard_Transient &)
     Assignment operator, needed to avoid copying reference counter.
    virtual ~Standard_Transient ()=default
     Destructor must be virtual.
    virtual const opencascade::handle< Standard_Type > & DynamicType () const
     Returns a type descriptor about this object.
    bool IsInstance (const opencascade::handle< Standard_Type > &theType) const
     Returns a true value if this is an instance of Type.
    bool IsInstance (const char *const theTypeName) const
     Returns a true value if this is an instance of TypeName.
    bool IsKind (const opencascade::handle< Standard_Type > &theType) const
     Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
    bool IsKind (const char *const theTypeName) const
     Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
    Standard_TransientThis () const
     Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.
    int GetRefCount () const noexcept
     Get the reference counter of this object.
    void IncrementRefCounter () noexcept
     Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations.
    int DecrementRefCounter () noexcept
     Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement.
    virtual void Delete () const
     Memory deallocator for transient classes.

    Static Public Member Functions

    static void Adding (const occ::handle< IFSelect_Activator > &actor, const int number, const char *const command, const int modemode)
     Records, in a Dictionary available for all the Activators, the command title an Activator can process, attached with its number, proper for this Activator <mode> allows to distinguish various execution modes 0: default mode; 1 : for xset.
    static void Remove (const char *const command)
     Removes a Command, if it is recorded (else, does nothing).
    static bool Select (const char *const command, int &number, occ::handle< IFSelect_Activator > &actor)
     Selects, for a Command given by its title, an actor with its command number. Returns True if found, False else.
    static int Mode (const char *const command)
     Returns mode recorded for a command. -1 if not found.
    static occ::handle< NCollection_HSequence< TCollection_AsciiString > > Commands (const int modemode=-1, const char *const command="")
     Returns, for a root of command title, the list of possible commands. <mode> : -1 (D) for all commands if <commands> is empty -1 + command : about a Group , >= 0 see Adding By default, it returns the whole list of known commands.
    static constexpr const char * get_type_name ()
     Returns a type descriptor about this object.
    static const opencascade::handle< Standard_Type > & get_type_descriptor ()
     Returns type descriptor of Standard_Transient class.

    Protected Member Functions

     IFSelect_Activator ()
     Sets the default values.

    Additional Inherited Members

    typedef void base_type
     Returns a type descriptor about this object.

    Detailed Description

    Defines the general frame for working with a SessionPilot. Each Activator treats a set of Commands. Commands are given as alphanumeric strings. They can be of two main forms :

    • classic, to list, evaluate, enrich the session (by itself) : no specific remark, its complete execution must be described
    • creation of a new item : instead of creatinf it plus adding it to the session (which is a classic way), it is possible to create it and make it recorded by the SessionPilot : then, the Pilot will add it to the session; this way allows the Pilot to manage itself named items

    In order to make easier the use of Activator, this class provides a simple way to Select an Actor for a Command : each sub-class of SectionActor defines the command titles it recognizes, plus attaches a Number, unique for this sub-class, to each distinct command title.

    Each time an action is required, the corresponding Number can then be given to help the selection of the action to do.

    The result of an Execution must indicate if it is worth to be recorded or not : see method Do

    Constructor & Destructor Documentation

    ◆ IFSelect_Activator()

    IFSelect_Activator::IFSelect_Activator ( )
    protected

    Sets the default values.

    Member Function Documentation

    ◆ Add()

    void IFSelect_Activator::Add ( const int number,
    const char *const command ) const

    Allows a self-definition by an Activator of the Commands it processes, call the class method Adding (mode 0).

    ◆ Adding()

    void IFSelect_Activator::Adding ( const occ::handle< IFSelect_Activator > & actor,
    const int number,
    const char *const command,
    const int mode )
    static

    Records, in a Dictionary available for all the Activators, the command title an Activator can process, attached with its number, proper for this Activator <mode> allows to distinguish various execution modes 0: default mode; 1 : for xset.

    ◆ AddSet()

    void IFSelect_Activator::AddSet ( const int number,
    const char *const command ) const

    Same as Add but specifies that this command is candidate for xset (creation of items, xset : named items; mode 1).

    ◆ Commands()

    occ::handle< NCollection_HSequence< TCollection_AsciiString > > IFSelect_Activator::Commands ( const int mode = -1,
    const char *const command = "" )
    static

    Returns, for a root of command title, the list of possible commands. <mode> : -1 (D) for all commands if <commands> is empty -1 + command : about a Group , >= 0 see Adding By default, it returns the whole list of known commands.

    ◆ Do()

    virtual IFSelect_ReturnStatus IFSelect_Activator::Do ( const int number,
    const occ::handle< IFSelect_SessionPilot > & pilot )
    pure virtual

    Tries to execute a Command Line. <number> is the number of the command for this Activator. It Must forecast to record the result of the execution, for need of Undo-Redo Must Returns : 0 for a void command (not to be recorded), 1 if execution OK, -1 if command incorrect, -2 if error on execution.

    Implemented in IFSelect_Act, IFSelect_SessionPilot, IGESSelect_Activator, and StepSelect_Activator.

    ◆ File()

    const char * IFSelect_Activator::File ( ) const

    ◆ Group()

    const char * IFSelect_Activator::Group ( ) const

    ◆ Help()

    virtual const char * IFSelect_Activator::Help ( const int number) const
    pure virtual

    Sends a short help message for a given command identified by it number for this Activator (must take one line max).

    Implemented in IFSelect_Act, IFSelect_SessionPilot, IGESSelect_Activator, and StepSelect_Activator.

    ◆ Mode()

    int IFSelect_Activator::Mode ( const char *const command)
    static

    Returns mode recorded for a command. -1 if not found.

    ◆ Remove()

    void IFSelect_Activator::Remove ( const char *const command)
    static

    Removes a Command, if it is recorded (else, does nothing).

    ◆ Select()

    bool IFSelect_Activator::Select ( const char *const command,
    int & number,
    occ::handle< IFSelect_Activator > & actor )
    static

    Selects, for a Command given by its title, an actor with its command number. Returns True if found, False else.

    ◆ SetForGroup()

    void IFSelect_Activator::SetForGroup ( const char *const group,
    const char *const file = "" )

    Group and SetGroup define a "Group of commands" which correspond to an Activator. Default is "XSTEP" Also a file may be attached.


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