0023912: TDataStd_ExtStringArray::Value() returns a copy of TCollection_ExtendedStrin...
[occt.git] / src / TDataStd / TDataStd_IntegerArray.cdl
1 -- Created on: 1999-06-16
2 -- Created by: Sergey RUIN
3 -- Copyright (c) 1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
5 --
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
10 --
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 --
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
20
21
22
23 class IntegerArray from TDataStd inherits Attribute from TDF
24
25         ---Purpose: Contains an array of integers.
26
27 uses  
28      GUID                     from Standard,        
29      HArray1OfInteger         from TColStd,           
30      Attribute                from TDF,
31      Label                    from TDF, 
32      DeltaOnModification      from TDF,
33      RelocationTable          from TDF
34
35 is 
36
37     ---Purpose: class methods
38     --          =============
39
40     GetID (myclass)   
41    ---C++: return const & 
42    ---Purpose: Returns the GUID for arrays of integers.  
43     returns GUID from Standard;
44
45     Set (myclass; label : Label from TDF; lower, upper : Integer from Standard; 
46                   isDelta : Boolean from Standard = Standard_False)
47     ---Purpose: Finds or creates on the <label> an integer array attribute 
48     -- with the specified <lower> and <upper> boundaries. 
49     -- If <isDelta> == False, DefaultDeltaOnModification is used.     
50     -- If attribute is already set, all input parameters are refused and the found
51     -- attribute is returned.
52     returns IntegerArray from TDataStd;
53
54     
55     ---Category: IntegerArray methods
56     --          ===============
57
58     Init(me : mutable; lower, upper : Integer from Standard);
59     ---Purpose: Initialize the inner array with bounds from <lower> to <upper>
60
61     SetValue (me : mutable; Index, Value : Integer from Standard);
62     ---Purpose: Sets  the   <Index>th  element  of   the  array to <Value>
63
64     Value (me; Index : Integer from Standard)
65     ---Purpose: Return the value of  the  <Index>th element of the array
66     --
67     ---C++: alias operator ()
68     returns Integer from Standard;
69
70     Lower (me) returns Integer from Standard;      
71     ---Purpose:  Returns the lower boundary of this array of integers. 
72     
73     Upper (me) returns Integer from Standard;
74     ---Purpose: Return the upper boundary of this array of integers.
75     
76     Length (me) returns Integer from Standard;    
77     ---Purpose: Returns the length of this array of integers in
78     --          terms of the number of elements it contains.
79    
80     ChangeArray(me : mutable; newArray : HArray1OfInteger from TColStd; 
81                               isCheckItems : Boolean = Standard_True);      
82     ---Purpose: Sets the inner array <myValue>  of the IntegerArray attribute to 
83     -- <newArray>. If value of <newArray> differs from <myValue>, Backup performed 
84     -- and myValue refers to new instance of HArray1OfInteger that holds <newArray>  
85     -- values 
86     -- If <isCheckItems> equal True each item of <newArray> will be checked with each 
87     -- item of <myValue> for coincidence (to avoid backup).
88     
89     Array(me) returns HArray1OfInteger from TColStd;
90     ---Purpose: Return the inner array of the IntegerArray attribute    
91     ---C++: inline 
92     ---C++: return const 
93      
94     GetDelta(me) returns Boolean from Standard;  
95     ---C++: inline  
96     
97     SetDelta(me : mutable; isDelta : Boolean from Standard);     
98     ---C++: inline  
99     ---Purpose: for  internal  use  only! 
100      
101     RemoveArray(me  : mutable) is private;      
102     ---C++: inline 
103      
104     
105     ---Category: methodes of TDF_Attribute
106     --           =========================
107
108     Create returns mutable IntegerArray from TDataStd; 
109     
110     ID (me)
111         ---C++: return const & 
112     returns GUID from Standard;
113
114     Restore (me: mutable; With : Attribute from TDF);
115
116     NewEmpty (me)
117     returns mutable Attribute from TDF;
118
119     Paste (me; Into : mutable Attribute from TDF;
120                RT   : mutable RelocationTable from TDF);    
121     ---Purpose: Note. Uses inside ChangeArray() method
122     
123     Dump(me; anOS : in out OStream from Standard)
124         returns OStream from Standard
125         is redefined;
126         ---C++: return &
127
128     ---Category: methods to be added for using in DeltaOn Modification  
129     --           =====================================================
130    DeltaOnModification(me; anOldAttribute : Attribute from TDF)
131         returns DeltaOnModification from TDF
132         ---Purpose : Makes a DeltaOnModification between <me> and
133         --         <anOldAttribute>.  
134         is redefined virtual;  
135         
136
137    
138     
139 fields
140
141     myValue   : HArray1OfInteger from TColStd; 
142     myIsDelta : Boolean from Standard;    
143 friends   
144
145     class DeltaOnModificationOfIntArray from TDataStd  
146     
147 end IntegerArray;