0024234: occt master is not compiled by VC++ 2005 (vc8 32/64 bit TKBO)
[occt.git] / src / TDataStd / TDataStd_IntPackedMap.cdl
CommitLineData
b311480e 1-- Created on: 2007-07-31
2-- Created by: Sergey ZARITCHNY
3-- Copyright (c) 2007-2012 OPEN CASCADE SAS
4--
5-- The content of this file is subject to the Open CASCADE Technology Public
6-- License Version 6.5 (the "License"). You may not use the content of this file
7-- except in compliance with the License. Please obtain a copy of the License
8-- at http://www.opencascade.org and read it completely before using this file.
9--
10-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12--
13-- The Original Code and all software distributed under the License is
14-- distributed on an "AS IS" basis, without warranty of any kind, and the
15-- Initial Developer hereby disclaims all such warranties, including without
16-- limitation, any warranties of merchantability, fitness for a particular
17-- purpose or non-infringement. Please see the License for the specific terms
18-- and conditions governing the rights and limitations under the License.
19
7fd59977 20
21
22class IntPackedMap from TDataStd inherits Attribute from TDF
23
24 ---Purpose: Attribute for storing TColStd_PackedMapOfInteger
25
26uses
27 Attribute from TDF,
28 Label from TDF,
29 GUID from Standard,
30 PackedMapOfInteger from TColStd,
31 HPackedMapOfInteger from TColStd,
32 DeltaOnModification from TDF,
33 RelocationTable from TDF
34
35
36is
37
38 ---Purpose: class methods
39 -- =============
40
41 GetID (myclass)
42 ---C++: return const &
43 ---Purpose: Returns the GUID of the attribute.
44 returns GUID from Standard;
45
46 Set (myclass; label : Label from TDF; isDelta : Boolean from Standard = Standard_False)
47 ---Purpose: Finds or creates an integer map attribute on the given label.
48 -- If <isDelta> == False, DefaultDeltaOnModification is used.
49 -- If <isDelta> == True, DeltaOnModification of the current attribute is used.
50 -- If attribute is already set, input parameter <isDelta> is refused and the found
51 -- attribute returned.
52 returns IntPackedMap from TDataStd;
53
54 ---Purpose: Attribute methods
55 -- ===================
56
57 Create
58 returns mutable IntPackedMap from TDataStd;
59 -- Constructor
60
61 ChangeMap (me : mutable; theMap : HPackedMapOfInteger from TColStd)
62 -- Sets the inner map to theMap. If the content of theMap is the same as myMap,
63 -- it does nothing and return false. Else full backup is performed.
64 returns Boolean from Standard;
65
66 GetMap (me)
67 returns PackedMapOfInteger from TColStd;
68 ---C++: inline
69 ---C++: return const &
70 -- Access to the const interface of the map
71
72 GetHMap (me)
73 returns HPackedMapOfInteger from TColStd;
74 ---C++: inline
75 ---C++: return const &
76 -- Access to the handle of the map.
77 -- WARNING! do not use the handle returned by this method to modify the map,
78 -- otherwise undo/redo mechanism will be failed.
79
80 Clear(me : mutable)
81 returns Boolean from Standard;
82 -- Clears the inner map. Returns false if map is alredy empty.
83
84 Add(me : mutable; theKey : Integer from Standard)
85 returns Boolean from Standard;
86 -- Adds a new key to the map. Returns false if this key already exists.
87
88 Remove(me : mutable; theKey : Integer from Standard)
89 returns Boolean from Standard;
90 -- Removes the key from the map. Returns false if this key was not found.
91
92 Contains(me; theKey : Integer from Standard)
93 returns Boolean from Standard;
94 -- Returns true if the key contains in the map, false otherwise
95
96 Extent(me)
97 ---C++: inline
98 returns Integer from Standard;
99 -- Returns the size of the map
100
101 IsEmpty(me)
102 ---C++: inline
103 returns Boolean from Standard;
104
105 GetDelta(me) returns Boolean from Standard;
106 ---C++: inline
107
108 SetDelta(me : mutable; isDelta : Boolean from Standard);
109 ---C++: inline
110 ---Purpose: for internal use only!
111
112 RemoveMap(me : mutable) is private;
113 ---C++: inline
114 ---Category: TDF_Attribute methods
115 -- =====================
116
117 ID (me)
118 ---C++: return const &
119 returns GUID from Standard;
120
121 Restore (me: mutable; with : Attribute from TDF);
122 -- Restores the backuped content from <with> into this one.
123
124 NewEmpty (me)
125 returns mutable Attribute from TDF;
126 -- Returns an new empty AsciiString attribute.
127
128 Paste (me; into : mutable Attribute from TDF;
129 RT : mutable RelocationTable from TDF);
130 -- This method is used when copying an attribute from a source structure
131 -- into a target structure.
132
133 Dump(me; anOS : in out OStream from Standard)
134 returns OStream from Standard
135 is redefined;
136 ---C++: return &
137 -- This method dumps the attribute value into the stream
138
139 ---Category: methods to be added for using in DeltaOn Modification
140 -- =====================================================
141 DeltaOnModification(me; anOldAttribute : Attribute from TDF)
142 returns DeltaOnModification from TDF
143 ---Purpose : Makes a DeltaOnModification between <me> and
144 -- <anOldAttribute>.
145 is redefined virtual;
146
147
148fields
149
150 myMap : HPackedMapOfInteger from TColStd;
151 myIsDelta : Boolean from Standard;
152
153friends
154
155 class DeltaOnModificationOfIntPackedMap from TDataStd
156
157end IntPackedMap;