summaryrefslogtreecommitdiff
path: root/inc/Dynamic.hxx
blob: 53a05949044ea8ffa2a592639c5858afe0e8e4b1 (plain)
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
// 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 _Dynamic_HeaderFile
#define _Dynamic_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif

#ifndef _Dynamic_ModeEnum_HeaderFile
#include <Dynamic_ModeEnum.hxx>
#endif
#ifndef _Standard_CString_HeaderFile
#include <Standard_CString.hxx>
#endif
class Dynamic_Node;
class Dynamic_Parameter;
class Dynamic_BooleanParameter;
class Dynamic_EnumerationParameter;
class Dynamic_IntegerParameter;
class Dynamic_RealParameter;
class Dynamic_StringParameter;
class Dynamic_ObjectParameter;
class Dynamic_InstanceParameter;
class Dynamic_ParameterNode;
class Dynamic_Variable;
class Dynamic_VariableGroup;
class Dynamic_AbstractVariableInstance;
class Dynamic_VariableInstance;
class Dynamic_CompositVariableInstance;
class Dynamic_VariableNode;
class Dynamic_Method;
class Dynamic_MethodDefinition;
class Dynamic_CompiledMethod;
class Dynamic_InterpretedMethod;
class Dynamic_CompositMethod;
class Dynamic_MethodInstance;
class Dynamic_MethodDefinitionsDictionary;
class Dynamic_SeqOfMethods;
class Dynamic_SequenceOfMethods;
class Dynamic_SeqOfMethodDefinitions;
class Dynamic_SequenceOfMethodDefinitions;
class Dynamic_DynamicClass;
class Dynamic_DynamicDerivedClass;
class Dynamic_SeqOfClasses;
class Dynamic_SequenceOfClasses;
class Dynamic_DynamicInstance;
class Dynamic_FuzzyClass;
class Dynamic_FuzzyDefinition;
class Dynamic_SeqOfFuzzyDefinitions;
class Dynamic_SequenceOfFuzzyDefinitions;
class Dynamic_FuzzyDefinitionsDictionary;
class Dynamic_FuzzyInstance;
class Dynamic_SequenceNodeOfSeqOfMethods;
class Dynamic_SequenceNodeOfSeqOfMethodDefinitions;
class Dynamic_SequenceNodeOfSeqOfClasses;
class Dynamic_SequenceNodeOfSeqOfFuzzyDefinitions;


//! This package propose a  set of abstract persistent <br>
//!          classes. These classes may  be sort in  three main <br>
//!          groups, which are : <br>
//! <br>
//!          - fuzzy classes <br>
//!          - methods <br>
//!          - dynamic classes <br>
//! <br>
//!          And in    two complementary  groups   used by  the <br>
//!          previously    described family,  which   are  : <br>
//! <br>
//!          - parameter classes <br>
//!          - variable classes <br>
//! <br>
//!          All the main classes  are manipulated  through two <br>
//!          steps which are : <br>
//! <br>
//!          - the definition  which gives the signature of the <br>
//!          object <br>
//!          -  the instanciation   which  always  references a <br>
//!          definition <br>
//! <br>
//!          This    separation has  been  created  to  clearly <br>
//!          separate the definition  of an object, a method or <br>
//!          a class which  is the description and the instance <br>
//!          which is the utilisation with  a particular set of <br>
//!          values.   In  this case  for few instanciations of <br>
//!          the same object, the definition can be unique. <br>
//! <br>
//!          Each family address a particular problem. <br>
//! <br>
//!          Dynamic class <br>
//!          ------------- <br>
//! <br>
//!          This family of  classes offers  the possibility to <br>
//!          define and to  manipulate  dynamically objets with <br>
//!          the  same  specifications        as C++   objects. <br>
//!          Dynamically  means without  CDL description    and <br>
//!          without compilation  and link  if all  the methods <br>
//!          attached are interpreted methods. <br>
//! <br>
//!          The first thing to  do is to define the  signature <br>
//!          of the class, in terms of fields and methods. <br>
//! <br>
//!          You  can  also  derive a   class  from others, add <br>
//!          fields, and add or redefine methods. <br>
//! <br>
//!          Then instances of the   class can be   created and <br>
//!          values can be assigned to the fields. <br>
//! <br>
//!          It is then possible to execute methods attached to <br>
//!          the definition of the class. These methods may set <br>
//!          computed values to  other fields, or simply return <br>
//!          them. <br>
//! <br>
//!          A method can be compiled or interpreted. <br>
//! <br>
//!          Fuzzy class <br>
//!          ----------- <br>
//! <br>
//!          A fuzzy  class   is a   degeneration  of a dynamic <br>
//!          class.  Only  the   fields are  specified.   These <br>
//!          classes  are useful    to describe  objects   with <br>
//!          various definitions, and  with the number and  the <br>
//!          nature of fields depending of the definition. <br>
//! <br>
//!          The definitions of the lights for Photo  Realistic <br>
//!          Renderer is an illutration of the use of the fuzzy <br>
//!          classes. <br>
//! <br>
//!          These lights have the same definitions in terms of <br>
//!          parameters as   the lights used  in the LightWorks <br>
//!          module. <br>
//! <br>
//!          For each type  of  light   an exhaustive set    of <br>
//!          parameters is  described,  and  each  parameter is <br>
//!          defined by its  name, its type  and, if necessary, <br>
//!          its default value as follows : <br>
//! <br>
//!          ambient <br>
//!                "intensity"   Standard_Real    1.0 <br>
//!                "colour"      Materials_PColor 1.0 1.0 1.0 <br>
//! <br>
//!          distant <br>
//!                "intensity"         Standard_Real          1.0 <br>
//!                "colour"            Materials_PColor       1.0 1.0 1.0 <br>
//!                "location"          PGeom_CartesianPoint   0.0 0.0 1.0 <br>
//!                "to"                PGeom_CartesianPoint   0.0 0.0 0.0 <br>
//!                "shadows"           Standard_Boolean       Standard_False <br>
//!                "shadow resolution" Standard_Integer       256 <br>
//!                "shadow quality"    Standard_Integer       4 <br>
//!                "shadow softness"   Standard_Real          1.0 <br>
//! <br>
//!          eye <br>
//!                "intensity"         Standard_Real          1.0 <br>
//!                "colour"            Materials_PColor       1.0 1.0 1.0 <br>
//! <br>
//!          point <br>
//!                "intensity"         Standard_Real            1.0 <br>
//!                "colour"            Materials_PColor         1.0 1.0 1.0 <br>
//!                "location"          PGeom_CartesianPoint     0.0 0.0 0.0 <br>
//!                "fall off"          LightWorks_LiFallOffType LI_FALL_OFF_CONSTANT <br>
//!                "shadows"           Standard_Boolean         Standard_False <br>
//!                "shadow resolution" Standard_Integer         256 <br>
//!                "shadow quality"    Standard_Integer         4 <br>
//!                "shadow softness"   Standard_Real            1.0 <br>
//! <br>
//!          spot <br>
//!                "intensity"         Standard_Real            1.0 <br>
//!                "colour"            Materials_PColor         1.0 1.0 1.0 <br>
//!                "location"          PGeom_CartesianPoint     0.0 0.0 1.0 <br>
//!                "to"                PGeom_CartesianPoint     0.0 0.0 0.0 <br>
//!                "fall off"          LightWorks_LiFallOffType LI_FALL_OFF_CONSTANT <br>
//!                "cone angle"        Standard_Real            60.0 <br>
//!                "cone delta angle"  Standard_Real            5.0 <br>
//!                "beam distribution" Standard_Real            2.0 <br>
//!                "shadows"           Standard_Boolean         Standard_False <br>
//!                "shadow resolution" Standard_Integer         256 <br>
//!                "shadow quality"    Standard_Integer         4 <br>
//!                "shadow softness"   Standard_Real            1.0 <br>
//! <br>
//!          All  these  definitions are described  in  a  file <br>
//!          which is read  at  the first  creation  of a light <br>
//!          instance to be put in a dictionary. <br>
//! <br>
//!          At the creation  of an instance, just  a reference <br>
//!          on the definition is set. All the parameter values <br>
//!          are read in the definition. If now  a value of one <br>
//!          parameter  is changed, the  modified parameter  is <br>
//!          added   to the  instance.   So  only  the modified <br>
//!          parameters are directely attached to the instance. <br>
//!          This behaviour allows the  use of an  instance  as <br>
//!          definition,  and can be  useful to create catalogs <br>
//!          of standards which  can be directly  questioned in <br>
//!          the database. <br>
//! <br>
//!          The use  of fuzzy classes needs four prerequisites <br>
//!          which are : <br>
//! <br>
//!          - The   creation  of a  file   with the exhaustive <br>
//!          description of all  the possible types taken by an <br>
//!          object and for each    type the complete   set  of <br>
//!          parameters  in  terms  of  name,   type,   and, if <br>
//!          necessary, default value. <br>
//! <br>
//!          -    The     inheritance    from     the     class <br>
//!          FuzzyDefinitionsDictionary  and, if necessary, the <br>
//!          redefinition of the  Switch  method for the   non- <br>
//!          standard type of parameters described in the file. <br>
//! <br>
//!          - The following method : <br>
//! <br>
//!          void  DictionaryOfDefinitions(Handle(MyPackage_MyDictionary)&); <br>
//! <br>
//!          must be  writen in the file MyPackage.cxx, because <br>
//!          this method   is  automatically  called   by   the <br>
//!          constructor of FuzzyInstance. This method tests if <br>
//!          the dictionary has  been  created yet.  If  it  is <br>
//!          true  the  method returns    a reference   to  it, <br>
//!          otherwise the method creates the dictionary before <br>
//!          returning the reference. <br>
//! <br>
//!          - The instanciation   of  the FuzzyInstance  class <br>
//!          with the pre-defined dictionary. <br>
//! <br>
//!          Method class <br>
//!          ------------ <br>
//! <br>
//!          The behaviour  of  these  classes  are  similar to <br>
//!          fuzzy classes.    Only the semantic  is different. <br>
//!          These   classes   are   for memorized actions   or <br>
//!          constraints,  e.g.  they  are useful  to memorized <br>
//!          persistently   the  working  system  of    Imagine <br>
//!          Conception. <br>
class Dynamic  {
public:

  void* operator new(size_t,void* anAddress) 
  {
    return anAddress;
  }
  void* operator new(size_t size) 
  {
    return Standard::Allocate(size); 
  }
  void  operator delete(void *anAddress) 
  {
    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
  }

  
  Standard_EXPORT   static  Dynamic_ModeEnum Mode(const Standard_CString amode) ;





protected:





private:




friend class Dynamic_Node;
friend class Dynamic_Parameter;
friend class Dynamic_BooleanParameter;
friend class Dynamic_EnumerationParameter;
friend class Dynamic_IntegerParameter;
friend class Dynamic_RealParameter;
friend class Dynamic_StringParameter;
friend class Dynamic_ObjectParameter;
friend class Dynamic_InstanceParameter;
friend class Dynamic_ParameterNode;
friend class Dynamic_Variable;
friend class Dynamic_VariableGroup;
friend class Dynamic_AbstractVariableInstance;
friend class Dynamic_VariableInstance;
friend class Dynamic_CompositVariableInstance;
friend class Dynamic_VariableNode;
friend class Dynamic_Method;
friend class Dynamic_MethodDefinition;
friend class Dynamic_CompiledMethod;
friend class Dynamic_InterpretedMethod;
friend class Dynamic_CompositMethod;
friend class Dynamic_MethodInstance;
friend class Dynamic_MethodDefinitionsDictionary;
friend class Dynamic_SeqOfMethods;
friend class Dynamic_SequenceOfMethods;
friend class Dynamic_SeqOfMethodDefinitions;
friend class Dynamic_SequenceOfMethodDefinitions;
friend class Dynamic_DynamicClass;
friend class Dynamic_DynamicDerivedClass;
friend class Dynamic_SeqOfClasses;
friend class Dynamic_SequenceOfClasses;
friend class Dynamic_DynamicInstance;
friend class Dynamic_FuzzyClass;
friend class Dynamic_FuzzyDefinition;
friend class Dynamic_SeqOfFuzzyDefinitions;
friend class Dynamic_SequenceOfFuzzyDefinitions;
friend class Dynamic_FuzzyDefinitionsDictionary;
friend class Dynamic_FuzzyInstance;
friend class Dynamic_SequenceNodeOfSeqOfMethods;
friend class Dynamic_SequenceNodeOfSeqOfMethodDefinitions;
friend class Dynamic_SequenceNodeOfSeqOfClasses;
friend class Dynamic_SequenceNodeOfSeqOfFuzzyDefinitions;

};





// other Inline functions and methods (like "C++: function call" methods)


#endif