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_Act Class Reference

    Act gives a simple way to define and add functions to be ran from a SessionPilot, as follows : More...

    #include <IFSelect_Act.hxx>

    Inheritance diagram for IFSelect_Act:

    Public Member Functions

     IFSelect_Act (const char *const namename, const char *const help, const IFSelect_ActFunc funcfunc)
     Creates an Act with a name, help and a function mode (Add or AddSet) is given when recording.
    IFSelect_ReturnStatus Do (const int number, const occ::handle< IFSelect_SessionPilot > &pilot) override
     Execution of Command Line. remark that <number> is senseless because each Act brings one and only one function.
    const char * Help (const int number) const override
     Short Help for commands : returns the help given to create.
    Public Member Functions inherited from IFSelect_Activator
    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).
    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_Transient & operator= (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_Transient * This () 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 SetGroup (const char *const groupgroup, const char *const file="")
     Changes the default group name for the following Acts group empty means to come back to default from Activator Also a file name can be precised (to query by getsource).
    static void AddFunc (const char *const namename, const char *const help, const IFSelect_ActFunc funcfunc)
     Adds a function with its name and help : creates an Act then records it as normal function.
    static void AddFSet (const char *const namename, const char *const help, const IFSelect_ActFunc funcfunc)
     Adds a function with its name and help : creates an Act then records it as function for XSET (i.e. to create control item).
    Static Public Member Functions inherited from IFSelect_Activator
    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.

    Additional Inherited Members

    typedef void base_type
     Returns a type descriptor about this object.
    Protected Member Functions inherited from IFSelect_Activator
     IFSelect_Activator ()
     Sets the default values.

    Detailed Description

    Act gives a simple way to define and add functions to be ran from a SessionPilot, as follows :

    Define a function as static IFSelect_RetStatus myfunc (const char* const name, const occ::handle<IFSelect_SessionPilot>& pilot) { ... } When ran, it receives the exact name (string) of the called function, and the SessionPilot which brings other infos

    Add it by IFSelect_Act::AddFunc (name,help,myfunc); for a normal function, or IFSelect_Act::AddFSet (name,help,myfunc); for a function which is intended to create a control item name and help are given as CString

    Then, it is available for run

    Constructor & Destructor Documentation

    ◆ IFSelect_Act()

    IFSelect_Act::IFSelect_Act ( const char *const name,
    const char *const help,
    const IFSelect_ActFunc func )

    Creates an Act with a name, help and a function mode (Add or AddSet) is given when recording.

    Member Function Documentation

    ◆ AddFSet()

    void IFSelect_Act::AddFSet ( const char *const name,
    const char *const help,
    const IFSelect_ActFunc func )
    static

    Adds a function with its name and help : creates an Act then records it as function for XSET (i.e. to create control item).

    ◆ AddFunc()

    void IFSelect_Act::AddFunc ( const char *const name,
    const char *const help,
    const IFSelect_ActFunc func )
    static

    Adds a function with its name and help : creates an Act then records it as normal function.

    ◆ Do()

    IFSelect_ReturnStatus IFSelect_Act::Do ( const int number,
    const occ::handle< IFSelect_SessionPilot > & pilot )
    overridevirtual

    Execution of Command Line. remark that <number> is senseless because each Act brings one and only one function.

    Implements IFSelect_Activator.

    ◆ Help()

    const char * IFSelect_Act::Help ( const int number) const
    overridevirtual

    Short Help for commands : returns the help given to create.

    Implements IFSelect_Activator.

    ◆ SetGroup()

    void IFSelect_Act::SetGroup ( const char *const group,
    const char *const file = "" )
    static

    Changes the default group name for the following Acts group empty means to come back to default from Activator Also a file name can be precised (to query by getsource).


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