0022746: Progress indicator in ShapeHealing
[occt.git] / src / ShapeProcess / ShapeProcess_Context.cdl
CommitLineData
7fd59977 1-- File: ShapeProcess_Context.cdl
2-- Created: Mon Aug 21 19:11:11 2000
3-- Author: Andrey BETENEV
4-- <abv@nnov.matra-dtv.fr>
5---Copyright: Matra Datavision 2000
6
7
8class Context from ShapeProcess inherits TShared from MMgt
9
10 ---Purpose: Provides convenient interface to resource file
11 -- Allows to load resource file and get values of
12 -- attributes starting from some scope, for example
13 -- if scope is defined as "ToV4" and requested parameter
14 -- is "exec.op", value of "ToV4.exec.op" parameter from
15 -- the resource file will be returned
16
17uses
18
b485ee79
KD
19 Manager from Resource,
20 AsciiString from TCollection,
7fd59977 21 HSequenceOfHAsciiString from TColStd,
b485ee79
KD
22 Messenger from Message,
23 ProgressIndicator from Message
7fd59977 24
25is
26
27 Create;
28 ---Purpose: Creates an empty tool
29
30 Create (file: CString; scope: CString = "");
31 ---Purpose: Creates a new tool and initialises by name of
32 -- resource file and (if specified) starting scope
33 -- Calls method Init()
34
35 Init (me: mutable; file: CString; scope: CString = "")
36 returns Boolean;
37 ---Purpose: Initialises a tool by loading resource file and
38 -- (if specified) sets starting scope
39 -- Returns False if resource file not found
40
41 LoadResourceManager(me: mutable; file: CString) returns Manager from Resource;
42 ---Purpose: Loading Resource_Manager object if this object not
43 -- equal internal static Resource_Manager object or
44 -- internal static Resource_Manager object is null
45
46 ResourceManager (me) returns Manager from Resource;
47 ---Purpose: Returns internal Resource_Manager object
48 ---C++: return const &
49
50 SetScope (me: mutable; scope: CString);
51 ---Purpose: Set a new (sub)scope
52
53 UnSetScope (me: mutable);
54 ---Purpose: Go out of current scope
55
56 IsParamSet (me; param: CString) returns Boolean;
57 ---Purpose: Returns True if parameter is defined in the resource file
58
59 GetReal (me; param: CString; val: out Real ) returns Boolean;
60 GetInteger (me; param: CString; val: out Integer) returns Boolean;
61 GetBoolean (me; param: CString; val: out Boolean) returns Boolean;
62 GetString (me; param: CString; val: out AsciiString from TCollection) returns Boolean;
63 ---Purpose: Get value of parameter as being of specific type
64 -- Returns False if parameter is not defined or has a wrong type
65
66 RealVal (me; param: CString; def: Real ) returns Real;
67 IntegerVal (me; param: CString; def: Integer) returns Integer;
68 BooleanVal (me; param: CString; def: Boolean) returns Boolean;
69 StringVal (me; param: CString; def: CString) returns CString;
70 ---Purpose: Get value of parameter as being of specific type
71 -- If parameter is not defined or does not have expected
72 -- type, returns default value as specified
73
74 SetMessenger (me: mutable; messenger: Messenger from Message);
75 ---Purpose : Sets Messenger used for outputting messages.
76
77 Messenger (me) returns Messenger from Message;
78 ---Purpose : Returns Messenger used for outputting messages.
b485ee79
KD
79
80 SetProgress (me: mutable; theProgress: ProgressIndicator from Message);
81 ---Purpose : Sets Progress Indicator.
82
83 Progress (me) returns ProgressIndicator from Message;
84 ---Purpose : Returns Progress Indicator.
7fd59977 85
86 SetTraceLevel (me: mutable; tracelev: Integer);
87 ---Purpose : Sets trace level used for outputting messages
88 -- - 0: no trace at all
89 -- - 1: errors
90 -- - 2: errors and warnings
91 -- - 3: all messages
92 -- Default is 1 : Errors traced
93
94 TraceLevel (me) returns Integer;
95 ---Purpose : Returns trace level used for outputting messages.
96
97fields
98
b485ee79
KD
99 myRC: Manager from Resource;
100 myScope: HSequenceOfHAsciiString from TColStd;
7fd59977 101 myMessenger: Messenger from Message;
b485ee79
KD
102 myProgress: ProgressIndicator from Message;
103 myTraceLev: Integer;
7fd59977 104
105end Context;