1 -- Created on: 2002-01-16
2 -- Created by: Michael PONIKAROV
3 -- Copyright (c) 2002-2012 OPEN CASCADE SAS
5 -- The content of this file is subject to the Open CASCADE Technology Public
6 -- License Version 6.5 (the "License"). You may not use the content of this file
7 -- except in compliance with the License. Please obtain a copy of the License
8 -- at http://www.opencascade.org and read it completely before using this file.
10 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 -- The Original Code and all software distributed under the License is
14 -- distributed on an "AS IS" basis, without warranty of any kind, and the
15 -- Initial Developer hereby disclaims all such warranties, including without
16 -- limitation, any warranties of merchantability, fitness for a particular
17 -- purpose or non-infringement. Please see the License for the specific terms
18 -- and conditions governing the rights and limitations under the License.
21 class ExtStringArray from TDataStd inherits Attribute from TDF
23 ---Purpose: ExtStringArray Attribute. Handles an
24 -- array of UNICODE strings (represented by the
25 -- TCollection_ExtendedString class).
27 uses GUID from Standard,
28 ExtendedString from TCollection,
29 HArray1OfExtendedString from TColStd,
32 DeltaOnModification from TDF,
33 RelocationTable from TDF
37 ---Purpose: class methods
41 ---C++: return const &
42 ---Purpose: Returns the GUID for the attribute.
43 returns GUID from Standard;
45 Set (myclass; label : Label from TDF; lower, upper : Integer from Standard;
46 isDelta : Boolean from Standard = Standard_False)
47 ---Purpose: Finds, or creates, an ExtStringArray attribute with <lower>
48 -- and <upper> bounds. The ExtStringArray attribute is returned.
49 -- If <isDelta> == False, DefaultDeltaOnModification is used.
50 -- If attribute is already set, all input parameters are refused
51 -- and the found attribute is returned.
52 returns ExtStringArray from TDataStd;
55 ---Category: ExtStringArray methods
58 Init(me : mutable; lower, upper : Integer from Standard);
59 ---Purpose: Initializes the inner array with bounds from <lower> to <upper>
61 SetValue (me : mutable; Index : Integer from Standard; Value : ExtendedString from TCollection);
62 ---Purpose: Sets the <Index>th element of the array to <Value>
63 -- OutOfRange exception is raised if <Index> doesn't respect Lower and Upper bounds of the internal array.
65 Value (me; Index : Integer from Standard)
66 ---Purpose: Returns the value of the <Index>th element of the array
68 ---C++: return const &
69 ---C++: alias operator ()
70 returns ExtendedString from TCollection;
72 Lower (me) returns Integer from Standard;
73 ---Purpose: Return the lower bound.
75 Upper (me) returns Integer from Standard;
76 ---Purpose: Return the upper bound
78 Length (me) returns Integer from Standard;
79 ---Purpose: Return the number of elements of <me>.
81 ChangeArray(me : mutable; newArray : HArray1OfExtendedString from TColStd;
82 isCheckItems : Boolean = Standard_True);
83 ---Purpose: Sets the inner array <myValue> of the ExtStringArray attribute to <newArray>.
84 -- If value of <newArray> differs from <myValue>, Backup performed and myValue
85 -- refers to new instance of HArray1OfExtendedString that holds <newArray> values
86 -- If <isCheckItems> equal True each item of <newArray> will be checked with each
87 -- item of <myValue> for coincidence (to avoid backup).
89 Array(me) returns HArray1OfExtendedString from TColStd;
90 ---Purpose: Return the inner array of the ExtStringArray attribute
94 GetDelta(me) returns Boolean from Standard;
97 SetDelta(me : mutable; isDelta : Boolean from Standard);
99 ---Purpose: for internal use only!
101 RemoveArray(me : mutable) is private;
104 ---Category: methodes of TDF_Attribute
105 -- =========================
107 Create returns mutable ExtStringArray from TDataStd;
110 ---C++: return const &
111 returns GUID from Standard;
113 Restore (me: mutable; With : Attribute from TDF);
116 returns mutable Attribute from TDF;
118 Paste (me; Into : mutable Attribute from TDF;
119 RT : mutable RelocationTable from TDF);
121 Dump(me; anOS : in out OStream from Standard)
122 returns OStream from Standard
126 ---Category: methods to be added for using in DeltaOn Modification
127 -- =====================================================
128 DeltaOnModification(me; anOldAttribute : Attribute from TDF)
129 returns DeltaOnModification from TDF
130 ---Purpose : Makes a DeltaOnModification between <me> and
132 is redefined virtual;
136 myValue : HArray1OfExtendedString from TColStd;
137 myIsDelta : Boolean from Standard;
140 class DeltaOnModificationOfExtStringArray from TDataStd