7fd59977 |
1 | -- File: TDataStd_ExtStringArray.cdl |
2 | -- Created: Wed Jan 16 10:10:33 2002 |
3 | -- Author: Michael PONIKAROV |
4 | -- <mpv@covox> |
5 | ---Copyright: Matra Datavision 2002 |
6 | |
7 | class ExtStringArray from TDataStd inherits Attribute from TDF |
8 | |
9 | ---Purpose: ExtStringArray Attribute. Handles an |
10 | -- array of UNICODE strings (represented by the |
11 | -- TCollection_ExtendedString class). |
12 | |
13 | uses GUID from Standard, |
14 | ExtendedString from TCollection, |
15 | HArray1OfExtendedString from TColStd, |
16 | Attribute from TDF, |
17 | Label from TDF, |
18 | DeltaOnModification from TDF, |
19 | RelocationTable from TDF |
20 | |
21 | is |
22 | |
23 | ---Purpose: class methods |
24 | -- ============= |
25 | |
26 | GetID (myclass) |
27 | ---C++: return const & |
28 | ---Purpose: Returns the GUID for the attribute. |
29 | returns GUID from Standard; |
30 | |
31 | Set (myclass; label : Label from TDF; lower, upper : Integer from Standard; |
32 | isDelta : Boolean from Standard = Standard_False) |
33 | ---Purpose: Finds, or creates, an ExtStringArray attribute with <lower> |
34 | -- and <upper> bounds. The ExtStringArray attribute is returned. |
35 | -- If <isDelta> == False, DefaultDeltaOnModification is used. |
36 | -- If attribute is already set, all input parameters are refused |
37 | -- and the found attribute is returned. |
38 | returns ExtStringArray from TDataStd; |
39 | |
40 | |
41 | ---Category: ExtStringArray methods |
42 | -- =============== |
43 | |
44 | Init(me : mutable; lower, upper : Integer from Standard); |
45 | ---Purpose: Initializes the inner array with bounds from <lower> to <upper> |
46 | |
47 | SetValue (me : mutable; Index : Integer from Standard; Value : ExtendedString from TCollection); |
48 | ---Purpose: Sets the <Index>th element of the array to <Value> |
49 | |
50 | Value (me; Index : Integer from Standard) |
51 | ---Purpose: Returns the value of the <Index>th element of the array |
52 | -- |
53 | ---C++: alias operator () |
54 | returns ExtendedString from TCollection; |
55 | |
56 | Lower (me) returns Integer from Standard; |
57 | ---Purpose: Return the lower bound. |
58 | |
59 | Upper (me) returns Integer from Standard; |
60 | ---Purpose: Return the upper bound |
61 | |
62 | Length (me) returns Integer from Standard; |
63 | ---Purpose: Return the number of elements of <me>. |
64 | |
65 | ChangeArray(me : mutable; newArray : HArray1OfExtendedString from TColStd; |
66 | isCheckItems : Boolean = Standard_True); |
67 | ---Purpose: Sets the inner array <myValue> of the ExtStringArray attribute to <newArray>. |
68 | -- If value of <newArray> differs from <myValue>, Backup performed and myValue |
69 | -- refers to new instance of HArray1OfExtendedString that holds <newArray> 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 HArray1OfExtendedString from TColStd; |
74 | ---Purpose: Return the inner array of the ExtStringArray 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 | ---Category: methodes of TDF_Attribute |
89 | -- ========================= |
90 | |
91 | Create returns mutable ExtStringArray from TDataStd; |
92 | |
93 | ID (me) |
94 | ---C++: return const & |
95 | returns GUID from Standard; |
96 | |
97 | Restore (me: mutable; With : Attribute from TDF); |
98 | |
99 | NewEmpty (me) |
100 | returns mutable Attribute from TDF; |
101 | |
102 | Paste (me; Into : mutable Attribute from TDF; |
103 | RT : mutable RelocationTable from TDF); |
104 | |
105 | Dump(me; anOS : in out OStream from Standard) |
106 | returns OStream from Standard |
107 | is redefined; |
108 | ---C++: return & |
109 | |
110 | ---Category: methods to be added for using in DeltaOn Modification |
111 | -- ===================================================== |
112 | DeltaOnModification(me; anOldAttribute : Attribute from TDF) |
113 | returns DeltaOnModification from TDF |
114 | ---Purpose : Makes a DeltaOnModification between <me> and |
115 | -- <anOldAttribute>. |
116 | is redefined virtual; |
117 | |
118 | fields |
119 | |
120 | myValue : HArray1OfExtendedString from TColStd; |
121 | myIsDelta : Boolean from Standard; |
122 | |
123 | friends |
124 | class DeltaOnModificationOfExtStringArray from TDataStd |
125 | |
126 | end ExtStringArray; |