OCC18056 Exception during copying Array attribute with array(0,0)
[occt.git] / src / TDataStd / TDataStd_IntPackedMap.cdl
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
6
7
8 class IntPackedMap from TDataStd inherits Attribute from TDF
9
10         ---Purpose: Attribute for storing TColStd_PackedMapOfInteger
11
12 uses
13     Attribute           from TDF,
14     Label               from TDF,
15     GUID                from Standard, 
16     PackedMapOfInteger  from TColStd,
17     HPackedMapOfInteger from TColStd, 
18     DeltaOnModification from TDF,
19     RelocationTable     from TDF
20
21
22 is
23
24     ---Purpose: class methods
25     --          =============
26
27     GetID (myclass)   
28         ---C++: return const & 
29         ---Purpose: Returns the GUID of the attribute.  
30     returns GUID from Standard;    
31
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;
39     
40     ---Purpose: Attribute methods
41     --          ===================
42     
43     Create 
44     returns mutable IntPackedMap from TDataStd;
45     -- Constructor    
46     
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; 
51     
52     GetMap (me)
53     returns PackedMapOfInteger from TColStd; 
54     ---C++: inline       
55     ---C++: return const &     
56     -- Access to the const interface of the map  
57      
58     GetHMap (me)
59     returns HPackedMapOfInteger from TColStd; 
60     ---C++: inline       
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.
65      
66     Clear(me : mutable) 
67     returns Boolean from Standard;
68     -- Clears the inner map. Returns false if map is alredy empty. 
69
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.  
73
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. 
77      
78     Contains(me; theKey : Integer from Standard) 
79     returns Boolean from Standard;     
80     -- Returns true if the key contains in the map, false otherwise
81      
82     Extent(me) 
83     ---C++: inline    
84     returns Integer from Standard;   
85     -- Returns the size of the map 
86      
87     IsEmpty(me)  
88     ---C++: inline    
89     returns Boolean from Standard;  
90      
91     GetDelta(me) returns Boolean from Standard;  
92     ---C++: inline  
93     
94     SetDelta(me : mutable; isDelta : Boolean from Standard);     
95     ---C++: inline  
96     ---Purpose: for  internal  use  only!       
97      
98     RemoveMap(me  : mutable) is private;      
99     ---C++: inline     
100     ---Category: TDF_Attribute methods
101     --           =====================
102     
103     ID (me)
104         ---C++: return const & 
105     returns GUID from Standard;
106
107     Restore (me: mutable; with : Attribute from TDF);
108     --  Restores the backuped content from <with> into this one. 
109     
110     NewEmpty (me)
111     returns mutable Attribute from TDF;
112     -- Returns an new empty AsciiString attribute. 
113     
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. 
118     
119     Dump(me; anOS : in out OStream from Standard)
120         returns OStream from Standard
121         is redefined;
122         ---C++: return &
123     -- This method dumps the attribute value into the stream  
124     
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
130         --         <anOldAttribute>.  
131         is redefined virtual;  
132         
133     
134 fields 
135
136     myMap : HPackedMapOfInteger from TColStd; 
137     myIsDelta : Boolean from Standard; 
138
139 friends   
140
141     class DeltaOnModificationOfIntPackedMap from TDataStd   
142     
143 end IntPackedMap;