Integration of OCCT 6.5.0 from SVN
[occt.git] / src / Interface / Interface_GTool.cdl
1 -- File:        Interface_GTool.cdl
2 -- Created:     Thu Jan  8 14:42:05 1998
3 -- Author:      Christian CAILLET
4 --              <xstep@heliox.paris1.matra-dtv.fr>
5 ---Copyright:    Matra Datavision 1998
6
7
8 class GTool  from Interface    inherits TShared
9
10     ---Purpose : GTool - General Tool for a Model
11     --           Provides the functions performed by Protocol/GeneralModule for
12     --           entities of a Model, and recorded in a GeneralLib
13     --           Optimized : once an entity has been queried, the GeneralLib is
14     --           not longer queried
15     --           Shareable between several users : as a Handle
16
17 uses Transient,
18      Protocol, GeneralLib, GeneralModule,
19      SignType, InterfaceModel,
20      IndexedDataMapOfTransientTransient from TColStd,
21      DataMapOfTransientInteger   from Interface
22
23 is
24
25     Create  returns mutable GTool;
26     ---Purpose : Creates an empty, not set, GTool
27
28     Create (proto : Protocol; nbent : Integer = 0)  returns mutable GTool;
29     ---Purpose : Creates a GTool from a Protocol
30     --           Optional starting count of entities
31
32     SetSignType (me : mutable; sign : SignType);
33     ---Purpose : Sets a new SignType
34
35     SignType    (me) returns SignType;
36     ---Purpose : Returns the SignType. Can be null
37
38     SignValue   (me; ent : Transient; model : InterfaceModel)
39         returns CString;
40     ---Purpose : Returns the Signature for a Transient Object in a Model
41     --           It calls SignType to do that
42     --           If SignType is not defined, return ClassName of <ent>
43
44     SignName    (me) returns CString;
45     ---Purpose : Returns the Name of the SignType, or "Class Name"
46
47     SetProtocol (me : mutable; proto : Protocol; enforce : Boolean = Standard_False);
48     ---Purpose : Sets a new Protocol
49     --           if <enforce> is False and the new Protocol equates the old one
50     --           then nothing is done
51
52     Protocol    (me) returns Protocol;
53     ---Purpose : Returns the Protocol.  Warning : it can be Null
54
55     Lib         (me : mutable) returns GeneralLib;
56     ---Purpose : Returns the GeneralLib itself
57     ---C++ : return &
58
59     Reservate   (me : mutable; nb : Integer; enforce : Boolean = Standard_False);
60     ---Purpose : Reservates maps for a count of entities
61     --           <enforce> False : minimum count
62     --           <enforce> True  : clears former reservations
63     --           Does not clear the maps
64
65     ClearEntities (me : mutable);
66     ---Purpose : Clears the maps which record, for each already recorded entity
67     --           its Module and Case Number
68
69     Select (me : mutable; ent : Transient;
70             gmod : out mutable GeneralModule;
71             CN   : out Integer;
72             enforce : Boolean = Standard_False)  returns Boolean;
73     ---Purpose : Selects for an entity, its Module and Case Number
74     --           It is optimised : once done for each entity, the result is
75     --           mapped and the GeneralLib is not longer queried
76     --           <enforce> True overpasses this optimisation
77
78 fields
79
80     theproto : Protocol;
81     thesign  : SignType;
82     thelib   : GeneralLib;
83     thentnum : DataMapOfTransientInteger;
84     thentmod : IndexedDataMapOfTransientTransient;
85
86 end GTool;