1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to
// this header file considered to be the "object code" form of the original source.
#ifndef _IFSelect_Act_HeaderFile
#define _IFSelect_Act_HeaderFile
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_DefineHandle_HeaderFile
#include <Standard_DefineHandle.hxx>
#endif
#ifndef _Handle_IFSelect_Act_HeaderFile
#include <Handle_IFSelect_Act.hxx>
#endif
#ifndef _TCollection_AsciiString_HeaderFile
#include <TCollection_AsciiString.hxx>
#endif
#ifndef _IFSelect_ActFunc_HeaderFile
#include <IFSelect_ActFunc.hxx>
#endif
#ifndef _IFSelect_Activator_HeaderFile
#include <IFSelect_Activator.hxx>
#endif
#ifndef _Standard_CString_HeaderFile
#include <Standard_CString.hxx>
#endif
#ifndef _IFSelect_ReturnStatus_HeaderFile
#include <IFSelect_ReturnStatus.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Handle_IFSelect_SessionPilot_HeaderFile
#include <Handle_IFSelect_SessionPilot.hxx>
#endif
class Standard_DomainError;
class IFSelect_SessionPilot;
//! Act gives a simple way to define and add functions to be ran <br>
//! from a SessionPilot, as follows : <br>
//! <br>
//! Define a function as <br>
//! static IFSelect_RetStatus myfunc <br>
//! (const Standard_CString name, <br>
//! const Handle(IFSelect_SessionPilot)& pilot) <br>
//! { ... } <br>
//! When ran, it receives the exact name (string) of the called <br>
//! function, and the SessionPilot which brings other infos <br>
//! <br>
//! Add it by <br>
//! IFSelect_Act::AddFunc (name,help,myfunc); <br>
//! for a normal function, or <br>
//! IFSelect_Act::AddFSet (name,help,myfunc); <br>
//! for a function which is intended to create a control item <br>
//! name and help are given as CString <br>
//! <br>
//! Then, it is available for run <br>
class IFSelect_Act : public IFSelect_Activator {
public:
//! Creates an Act with a name, help and a function <br>
//! mode (Add or AddSet) is given when recording <br>
Standard_EXPORT IFSelect_Act(const Standard_CString name,const Standard_CString help,const IFSelect_ActFunc func);
//! Execution of Command Line. remark that <number> is senseless <br>
//! because each Act brings one and only one function <br>
Standard_EXPORT IFSelect_ReturnStatus Do(const Standard_Integer number,const Handle(IFSelect_SessionPilot)& pilot) ;
//! Short Help for commands : returns the help given to create <br>
Standard_EXPORT Standard_CString Help(const Standard_Integer number) const;
//! Changes the default group name for the following Acts <br>
//! group empty means to come back to default from Activator <br>
//! Also a file name can be precised (to query by getsource) <br>
Standard_EXPORT static void SetGroup(const Standard_CString group,const Standard_CString file = "") ;
//! Adds a function with its name and help : creates an Act then <br>
//! records it as normal function <br>
Standard_EXPORT 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 <br>
//! records it as function for XSET (i.e. to create control item) <br>
Standard_EXPORT static void AddFSet(const Standard_CString name,const Standard_CString help,const IFSelect_ActFunc func) ;
DEFINE_STANDARD_RTTI(IFSelect_Act)
protected:
private:
TCollection_AsciiString thename;
TCollection_AsciiString thehelp;
IFSelect_ActFunc thefunc;
};
// other Inline functions and methods (like "C++: function call" methods)
#endif
|