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
8 class GTool from Interface inherits TShared
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
15 -- Shareable between several users : as a Handle
18 Protocol, GeneralLib, GeneralModule,
19 SignType, InterfaceModel,
20 IndexedDataMapOfTransientTransient from TColStd,
21 DataMapOfTransientInteger from Interface
25 Create returns mutable GTool;
26 ---Purpose : Creates an empty, not set, GTool
28 Create (proto : Protocol; nbent : Integer = 0) returns mutable GTool;
29 ---Purpose : Creates a GTool from a Protocol
30 -- Optional starting count of entities
32 SetSignType (me : mutable; sign : SignType);
33 ---Purpose : Sets a new SignType
35 SignType (me) returns SignType;
36 ---Purpose : Returns the SignType. Can be null
38 SignValue (me; ent : Transient; model : InterfaceModel)
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>
44 SignName (me) returns CString;
45 ---Purpose : Returns the Name of the SignType, or "Class Name"
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
52 Protocol (me) returns Protocol;
53 ---Purpose : Returns the Protocol. Warning : it can be Null
55 Lib (me : mutable) returns GeneralLib;
56 ---Purpose : Returns the GeneralLib itself
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
65 ClearEntities (me : mutable);
66 ---Purpose : Clears the maps which record, for each already recorded entity
67 -- its Module and Case Number
69 Select (me : mutable; ent : Transient;
70 gmod : out mutable GeneralModule;
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
83 thentnum : DataMapOfTransientInteger;
84 thentmod : IndexedDataMapOfTransientTransient;