Open CASCADE Technology 6.6.0
Public Member Functions | Static Public Member Functions
IFSelect_Act Class Reference

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 Standard_CString name,
const 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

#include <IFSelect_Act.hxx>

Inheritance diagram for IFSelect_Act:
Inheritance graph
[legend]

Public Member Functions

 IFSelect_Act (const Standard_CString name, const Standard_CString help, const IFSelect_ActFunc func)
 Creates an Act with a name, help and a function
mode (Add or AddSet) is given when recording

IFSelect_ReturnStatus Do (const Standard_Integer number, const Handle< IFSelect_SessionPilot > &pilot)
 Execution of Command Line. remark that <number> is senseless
because each Act brings one and only one function

Standard_CString Help (const Standard_Integer number) const
 Short Help for commands : returns the help given to create

Static Public Member Functions

static void SetGroup (const Standard_CString group, const Standard_CString 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 Standard_CString name, const Standard_CString help, const IFSelect_ActFunc func)
 Adds a function with its name and help : creates an Act then
records it as normal function

static void AddFSet (const Standard_CString name, const Standard_CString help, const IFSelect_ActFunc func)
 Adds a function with its name and help : creates an Act then
records it as function for XSET (i.e. to create control item)


Constructor & Destructor Documentation

IFSelect_Act::IFSelect_Act ( const Standard_CString  name,
const Standard_CString  help,
const IFSelect_ActFunc  func 
)

Member Function Documentation

static void IFSelect_Act::AddFSet ( const Standard_CString  name,
const Standard_CString  help,
const IFSelect_ActFunc  func 
) [static]
static void IFSelect_Act::AddFunc ( const Standard_CString  name,
const Standard_CString  help,
const IFSelect_ActFunc  func 
) [static]
IFSelect_ReturnStatus IFSelect_Act::Do ( const Standard_Integer  number,
const Handle< IFSelect_SessionPilot > &  pilot 
) [virtual]

Implements IFSelect_Activator.

Standard_CString IFSelect_Act::Help ( const Standard_Integer  number) const [virtual]

Implements IFSelect_Activator.

static void IFSelect_Act::SetGroup ( const Standard_CString  group,
const Standard_CString  file = "" 
) [static]

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines