Backup() is not efficient in TDataStd array attributes.
[occt.git] / src / TDataStd / TDataStd_ExtStringArray.cdl
1 -- Created on: 2002-01-16
2 -- Created by: Michael PONIKAROV
3 -- Copyright (c) 2002-2014 OPEN CASCADE SAS
4 --
5 -- This file is part of Open CASCADE Technology software library.
6 --
7 -- This library is free software; you can redistribute it and/or modify it under
8 -- the terms of the GNU Lesser General Public License version 2.1 as published
9 -- by the Free Software Foundation, with special exception defined in the file
10 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 -- distribution for complete text of the license and disclaimer of any warranty.
12 --
13 -- Alternatively, this file may be used under the terms of Open CASCADE
14 -- commercial license or contractual agreement.
15
16 class ExtStringArray from TDataStd inherits Attribute from TDF
17
18         ---Purpose: ExtStringArray Attribute. Handles an
19         -- array of UNICODE strings (represented by the
20         -- TCollection_ExtendedString class).
21
22 uses GUID                     from Standard,
23      ExtendedString           from TCollection,
24      HArray1OfExtendedString  from TColStd, 
25      Attribute                from TDF,     
26      Label                    from TDF, 
27      DeltaOnModification      from TDF,     
28      RelocationTable          from TDF
29
30 is 
31
32     ---Purpose: class methods
33     --          =============
34
35     GetID (myclass)   
36     ---C++: return const &  
37     ---Purpose: Returns the GUID for the attribute.  
38     returns GUID from Standard;
39
40     Set (myclass; label : Label from TDF; lower, upper : Integer from Standard; 
41                   isDelta : Boolean from Standard = Standard_False)
42     ---Purpose: Finds, or creates, an ExtStringArray attribute with <lower> 
43     -- and <upper> bounds on the specified label. 
44     -- If <isDelta> == False, DefaultDeltaOnModification is used. 
45     -- If <isDelta> == True, DeltaOnModification of the current attribute is used.
46     -- If attribute is already set, all input parameters are refused and the found
47     -- attribute is returned.
48     returns ExtStringArray from TDataStd;
49
50     
51     ---Category: ExtStringArray methods
52     --          ===============
53
54     Init(me : mutable; lower, upper : Integer from Standard);
55     ---Purpose: Initializes the inner array with bounds from <lower> to <upper>
56
57     SetValue (me : mutable; Index : Integer from Standard; Value : ExtendedString from TCollection);
58     ---Purpose: Sets  the   <Index>th  element  of   the  array to <Value>
59     -- OutOfRange exception is raised if <Index> doesn't respect Lower and Upper bounds of the internal  array.
60
61     Value (me; Index : Integer from Standard)
62     ---Purpose: Returns the value of  the  <Index>th element of the array
63     --
64     ---C++: return const &
65     ---C++: alias operator ()
66     returns ExtendedString from TCollection;
67
68     Lower (me) returns Integer from Standard;
69     ---Purpose:  Return the lower bound.
70
71     Upper (me) returns Integer from Standard;
72     ---Purpose: Return the upper bound
73     
74     Length (me) returns Integer from Standard;
75     ---Purpose: Return the number of elements of <me>.
76    
77     ChangeArray(me : mutable; newArray : HArray1OfExtendedString from TColStd; 
78                               isCheckItems : Boolean = Standard_True);      
79     ---Purpose: Sets the inner array <myValue> of the ExtStringArray attribute to <newArray>. 
80     -- If value of <newArray> differs from <myValue>, Backup performed and myValue 
81     -- refers to new instance of HArray1OfExtendedString that holds <newArray> values
82     -- If <isCheckItems> equal True each item of <newArray> will be checked with each 
83     -- item of <myValue> for coincidence (to avoid backup). 
84     
85     Array(me) returns HArray1OfExtendedString from TColStd;
86     ---Purpose: Return the inner array of the ExtStringArray attribute    
87     ---C++: inline 
88     ---C++: return const     
89     
90     GetDelta(me) returns Boolean from Standard;  
91     ---C++: inline  
92     
93     SetDelta(me : mutable; isDelta : Boolean from Standard);     
94     ---C++: inline  
95     ---Purpose: for  internal  use  only!   
96      
97     RemoveArray(me  : mutable) is private;      
98     ---C++: inline 
99          
100     ---Category: methodes of TDF_Attribute
101     --           =========================
102
103     Create returns ExtStringArray from TDataStd; 
104     
105     ID (me)
106         ---C++: return const & 
107     returns GUID from Standard;
108
109     Restore (me: mutable; With : Attribute from TDF);
110
111     NewEmpty (me)
112     returns Attribute from TDF;
113
114     Paste (me; Into : Attribute from TDF;
115                RT   : RelocationTable from TDF);    
116
117     Dump(me; anOS : in out OStream from Standard)
118         returns OStream from Standard
119         is redefined;
120         ---C++: return &
121
122     ---Category: methods to be added for using in DeltaOn Modification  
123     --           =====================================================
124     DeltaOnModification(me; anOldAttribute : Attribute from TDF)
125         returns DeltaOnModification from TDF
126         ---Purpose : Makes a DeltaOnModification between <me> and
127         --         <anOldAttribute>.  
128         is redefined virtual;  
129         
130 fields
131
132     myValue : HArray1OfExtendedString from TColStd;
133     myIsDelta : Boolean from Standard;   
134      
135 friends   
136     class DeltaOnModificationOfExtStringArray from TDataStd     
137     
138 end ExtStringArray;