1 -- Created on: 2002-01-16
2 -- Created by: Michael PONIKAROV
3 -- Copyright (c) 2002-2014 OPEN CASCADE SAS
5 -- This file is part of Open CASCADE Technology software library.
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.
13 -- Alternatively, this file may be used under the terms of Open CASCADE
14 -- commercial license or contractual agreement.
16 class ExtStringArray from TDataStd inherits Attribute from TDF
18 ---Purpose: ExtStringArray Attribute. Handles an
19 -- array of UNICODE strings (represented by the
20 -- TCollection_ExtendedString class).
22 uses GUID from Standard,
23 ExtendedString from TCollection,
24 HArray1OfExtendedString from TColStd,
27 DeltaOnModification from TDF,
28 RelocationTable from TDF
32 ---Purpose: class methods
36 ---C++: return const &
37 ---Purpose: Returns the GUID for the attribute.
38 returns GUID from Standard;
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. The ExtStringArray attribute is returned.
44 -- If <isDelta> == False, DefaultDeltaOnModification is used.
45 -- If attribute is already set, all input parameters are refused
46 -- and the found attribute is returned.
47 returns ExtStringArray from TDataStd;
50 ---Category: ExtStringArray methods
53 Init(me : mutable; lower, upper : Integer from Standard);
54 ---Purpose: Initializes the inner array with bounds from <lower> to <upper>
56 SetValue (me : mutable; Index : Integer from Standard; Value : ExtendedString from TCollection);
57 ---Purpose: Sets the <Index>th element of the array to <Value>
58 -- OutOfRange exception is raised if <Index> doesn't respect Lower and Upper bounds of the internal array.
60 Value (me; Index : Integer from Standard)
61 ---Purpose: Returns the value of the <Index>th element of the array
63 ---C++: return const &
64 ---C++: alias operator ()
65 returns ExtendedString from TCollection;
67 Lower (me) returns Integer from Standard;
68 ---Purpose: Return the lower bound.
70 Upper (me) returns Integer from Standard;
71 ---Purpose: Return the upper bound
73 Length (me) returns Integer from Standard;
74 ---Purpose: Return the number of elements of <me>.
76 ChangeArray(me : mutable; newArray : HArray1OfExtendedString from TColStd;
77 isCheckItems : Boolean = Standard_True);
78 ---Purpose: Sets the inner array <myValue> of the ExtStringArray attribute to <newArray>.
79 -- If value of <newArray> differs from <myValue>, Backup performed and myValue
80 -- refers to new instance of HArray1OfExtendedString that holds <newArray> values
81 -- If <isCheckItems> equal True each item of <newArray> will be checked with each
82 -- item of <myValue> for coincidence (to avoid backup).
84 Array(me) returns HArray1OfExtendedString from TColStd;
85 ---Purpose: Return the inner array of the ExtStringArray attribute
89 GetDelta(me) returns Boolean from Standard;
92 SetDelta(me : mutable; isDelta : Boolean from Standard);
94 ---Purpose: for internal use only!
96 RemoveArray(me : mutable) is private;
99 ---Category: methodes of TDF_Attribute
100 -- =========================
102 Create returns ExtStringArray from TDataStd;
105 ---C++: return const &
106 returns GUID from Standard;
108 Restore (me: mutable; With : Attribute from TDF);
111 returns Attribute from TDF;
113 Paste (me; Into : Attribute from TDF;
114 RT : RelocationTable from TDF);
116 Dump(me; anOS : in out OStream from Standard)
117 returns OStream from Standard
121 ---Category: methods to be added for using in DeltaOn Modification
122 -- =====================================================
123 DeltaOnModification(me; anOldAttribute : Attribute from TDF)
124 returns DeltaOnModification from TDF
125 ---Purpose : Makes a DeltaOnModification between <me> and
127 is redefined virtual;
131 myValue : HArray1OfExtendedString from TColStd;
132 myIsDelta : Boolean from Standard;
135 class DeltaOnModificationOfExtStringArray from TDataStd