7fd59977 |
1 | -- File: TDataStd_IntegerArray.cdl |
2 | -- Created: Wed Jun 16 11:04:48 1999 |
3 | -- Author: Sergey RUIN |
4 | ---Copyright: Matra Datavision 1999 |
5 | |
6 | |
7 | class IntegerArray from TDataStd inherits Attribute from TDF |
8 | |
9 | ---Purpose: Contains an array of integers. |
10 | |
11 | uses |
12 | GUID from Standard, |
13 | HArray1OfInteger from TColStd, |
14 | Attribute from TDF, |
15 | Label from TDF, |
16 | DeltaOnModification from TDF, |
17 | RelocationTable from TDF |
18 | |
19 | is |
20 | |
21 | ---Purpose: class methods |
22 | -- ============= |
23 | |
24 | GetID (myclass) |
25 | ---C++: return const & |
26 | ---Purpose: Returns the GUID for arrays of integers. |
27 | returns GUID from Standard; |
28 | |
29 | Set (myclass; label : Label from TDF; lower, upper : Integer from Standard; |
30 | isDelta : Boolean from Standard = Standard_False) |
31 | ---Purpose: Finds or creates on the <label> an integer array attribute |
32 | -- with the specified <lower> and <upper> boundaries. |
33 | -- If <isDelta> == False, DefaultDeltaOnModification is used. |
34 | -- If attribute is already set, all input parameters are refused and the found |
35 | -- attribute is returned. |
36 | returns IntegerArray from TDataStd; |
37 | |
38 | |
39 | ---Category: IntegerArray methods |
40 | -- =============== |
41 | |
42 | Init(me : mutable; lower, upper : Integer from Standard); |
43 | ---Purpose: Initialize the inner array with bounds from <lower> to <upper> |
44 | |
45 | SetValue (me : mutable; Index, Value : Integer from Standard); |
46 | ---Purpose: Sets the <Index>th element of the array to <Value> |
47 | |
48 | Value (me; Index : Integer from Standard) |
49 | ---Purpose: Return the value of the <Index>th element of the array |
50 | -- |
51 | ---C++: alias operator () |
52 | returns Integer from Standard; |
53 | |
54 | Lower (me) returns Integer from Standard; |
55 | ---Purpose: Returns the lower boundary of this array of integers. |
56 | |
57 | Upper (me) returns Integer from Standard; |
58 | ---Purpose: Return the upper boundary of this array of integers. |
59 | |
60 | Length (me) returns Integer from Standard; |
61 | ---Purpose: Returns the length of this array of integers in |
62 | -- terms of the number of elements it contains. |
63 | |
64 | ChangeArray(me : mutable; newArray : HArray1OfInteger from TColStd; |
65 | isCheckItems : Boolean = Standard_True); |
66 | ---Purpose: Sets the inner array <myValue> of the IntegerArray attribute to |
67 | -- <newArray>. If value of <newArray> differs from <myValue>, Backup performed |
68 | -- and myValue refers to new instance of HArray1OfInteger that holds <newArray> |
69 | -- values |
70 | -- If <isCheckItems> equal True each item of <newArray> will be checked with each |
71 | -- item of <myValue> for coincidence (to avoid backup). |
72 | |
73 | Array(me) returns HArray1OfInteger from TColStd; |
74 | ---Purpose: Return the inner array of the IntegerArray attribute |
75 | ---C++: inline |
76 | ---C++: return const |
77 | |
78 | GetDelta(me) returns Boolean from Standard; |
79 | ---C++: inline |
80 | |
81 | SetDelta(me : mutable; isDelta : Boolean from Standard); |
82 | ---C++: inline |
83 | ---Purpose: for internal use only! |
84 | |
85 | RemoveArray(me : mutable) is private; |
86 | ---C++: inline |
87 | |
88 | |
89 | ---Category: methodes of TDF_Attribute |
90 | -- ========================= |
91 | |
92 | Create returns mutable IntegerArray from TDataStd; |
93 | |
94 | ID (me) |
95 | ---C++: return const & |
96 | returns GUID from Standard; |
97 | |
98 | Restore (me: mutable; With : Attribute from TDF); |
99 | |
100 | NewEmpty (me) |
101 | returns mutable Attribute from TDF; |
102 | |
103 | Paste (me; Into : mutable Attribute from TDF; |
104 | RT : mutable RelocationTable from TDF); |
105 | ---Purpose: Note. Uses inside ChangeArray() method |
106 | |
107 | Dump(me; anOS : in out OStream from Standard) |
108 | returns OStream from Standard |
109 | is redefined; |
110 | ---C++: return & |
111 | |
112 | ---Category: methods to be added for using in DeltaOn Modification |
113 | -- ===================================================== |
114 | DeltaOnModification(me; anOldAttribute : Attribute from TDF) |
115 | returns DeltaOnModification from TDF |
116 | ---Purpose : Makes a DeltaOnModification between <me> and |
117 | -- <anOldAttribute>. |
118 | is redefined virtual; |
119 | |
120 | |
121 | |
122 | |
123 | fields |
124 | |
125 | myValue : HArray1OfInteger from TColStd; |
126 | myIsDelta : Boolean from Standard; |
127 | friends |
128 | |
129 | class DeltaOnModificationOfIntArray from TDataStd |
130 | |
131 | end IntegerArray; |