1 -- File: TDataStd_IntPackedMap.cdl
2 -- Created: Tue Jul 31 15:30:36 2007
3 -- Author: Sergey ZARITCHNY
4 -- <sergey.zaritchny@opencascade.com>
5 ---Copyright: Open CasCade SA 2007
8 class IntPackedMap from TDataStd inherits Attribute from TDF
10 ---Purpose: Attribute for storing TColStd_PackedMapOfInteger
16 PackedMapOfInteger from TColStd,
17 HPackedMapOfInteger from TColStd,
18 DeltaOnModification from TDF,
19 RelocationTable from TDF
24 ---Purpose: class methods
28 ---C++: return const &
29 ---Purpose: Returns the GUID of the attribute.
30 returns GUID from Standard;
32 Set (myclass; label : Label from TDF; isDelta : Boolean from Standard = Standard_False)
33 ---Purpose: Finds or creates an integer map attribute on the given label.
34 -- If <isDelta> == False, DefaultDeltaOnModification is used.
35 -- If <isDelta> == True, DeltaOnModification of the current attribute is used.
36 -- If attribute is already set, input parameter <isDelta> is refused and the found
37 -- attribute returned.
38 returns IntPackedMap from TDataStd;
40 ---Purpose: Attribute methods
41 -- ===================
44 returns mutable IntPackedMap from TDataStd;
47 ChangeMap (me : mutable; theMap : HPackedMapOfInteger from TColStd)
48 -- Sets the inner map to theMap. If the content of theMap is the same as myMap,
49 -- it does nothing and return false. Else full backup is performed.
50 returns Boolean from Standard;
53 returns PackedMapOfInteger from TColStd;
55 ---C++: return const &
56 -- Access to the const interface of the map
59 returns HPackedMapOfInteger from TColStd;
61 ---C++: return const &
62 -- Access to the handle of the map.
63 -- WARNING! do not use the handle returned by this method to modify the map,
64 -- otherwise undo/redo mechanism will be failed.
67 returns Boolean from Standard;
68 -- Clears the inner map. Returns false if map is alredy empty.
70 Add(me : mutable; theKey : Integer from Standard)
71 returns Boolean from Standard;
72 -- Adds a new key to the map. Returns false if this key already exists.
74 Remove(me : mutable; theKey : Integer from Standard)
75 returns Boolean from Standard;
76 -- Removes the key from the map. Returns false if this key was not found.
78 Contains(me; theKey : Integer from Standard)
79 returns Boolean from Standard;
80 -- Returns true if the key contains in the map, false otherwise
84 returns Integer from Standard;
85 -- Returns the size of the map
89 returns Boolean from Standard;
91 GetDelta(me) returns Boolean from Standard;
94 SetDelta(me : mutable; isDelta : Boolean from Standard);
96 ---Purpose: for internal use only!
98 RemoveMap(me : mutable) is private;
100 ---Category: TDF_Attribute methods
101 -- =====================
104 ---C++: return const &
105 returns GUID from Standard;
107 Restore (me: mutable; with : Attribute from TDF);
108 -- Restores the backuped content from <with> into this one.
111 returns mutable Attribute from TDF;
112 -- Returns an new empty AsciiString attribute.
114 Paste (me; into : mutable Attribute from TDF;
115 RT : mutable RelocationTable from TDF);
116 -- This method is used when copying an attribute from a source structure
117 -- into a target structure.
119 Dump(me; anOS : in out OStream from Standard)
120 returns OStream from Standard
123 -- This method dumps the attribute value into the stream
125 ---Category: methods to be added for using in DeltaOn Modification
126 -- =====================================================
127 DeltaOnModification(me; anOldAttribute : Attribute from TDF)
128 returns DeltaOnModification from TDF
129 ---Purpose : Makes a DeltaOnModification between <me> and
131 is redefined virtual;
136 myMap : HPackedMapOfInteger from TColStd;
137 myIsDelta : Boolean from Standard;
141 class DeltaOnModificationOfIntPackedMap from TDataStd