1 -- Created on: 2007-07-31
2 -- Created by: Sergey ZARITCHNY
3 -- Copyright (c) 2007-2012 OPEN CASCADE SAS
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.
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.
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.
22 class IntPackedMap from TDataStd inherits Attribute from TDF
24 ---Purpose: Attribute for storing TColStd_PackedMapOfInteger
30 PackedMapOfInteger from TColStd,
31 HPackedMapOfInteger from TColStd,
32 DeltaOnModification from TDF,
33 RelocationTable from TDF
38 ---Purpose: class methods
42 ---C++: return const &
43 ---Purpose: Returns the GUID of the attribute.
44 returns GUID from Standard;
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;
54 ---Purpose: Attribute methods
55 -- ===================
58 returns mutable IntPackedMap from TDataStd;
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;
67 returns PackedMapOfInteger from TColStd;
69 ---C++: return const &
70 -- Access to the const interface of the map
73 returns HPackedMapOfInteger from TColStd;
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.
81 returns Boolean from Standard;
82 -- Clears the inner map. Returns false if map is alredy empty.
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.
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.
92 Contains(me; theKey : Integer from Standard)
93 returns Boolean from Standard;
94 -- Returns true if the key contains in the map, false otherwise
98 returns Integer from Standard;
99 -- Returns the size of the map
103 returns Boolean from Standard;
105 GetDelta(me) returns Boolean from Standard;
108 SetDelta(me : mutable; isDelta : Boolean from Standard);
110 ---Purpose: for internal use only!
112 RemoveMap(me : mutable) is private;
114 ---Category: TDF_Attribute methods
115 -- =====================
118 ---C++: return const &
119 returns GUID from Standard;
121 Restore (me: mutable; with : Attribute from TDF);
122 -- Restores the backuped content from <with> into this one.
125 returns mutable Attribute from TDF;
126 -- Returns an new empty AsciiString attribute.
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.
133 Dump(me; anOS : in out OStream from Standard)
134 returns OStream from Standard
137 -- This method dumps the attribute value into the stream
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
145 is redefined virtual;
150 myMap : HPackedMapOfInteger from TColStd;
151 myIsDelta : Boolean from Standard;
155 class DeltaOnModificationOfIntPackedMap from TDataStd