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 on the specified label.
44 -- If <isDelta> == False, DefaultDeltaOnModification is used.
45 -- If <isDelta> == True, DeltaOnModification of the current attribute is used.
46 -- If attribute is already set, all input parameters are refused and the found
47 -- attribute is returned.
48 returns ExtStringArray from TDataStd;
51 ---Category: ExtStringArray methods
54 Init(me : mutable; lower, upper : Integer from Standard);
55 ---Purpose: Initializes the inner array with bounds from <lower> to <upper>
57 SetValue (me : mutable; Index : Integer from Standard; Value : ExtendedString from TCollection);
58 ---Purpose: Sets the <Index>th element of the array to <Value>
59 -- OutOfRange exception is raised if <Index> doesn't respect Lower and Upper bounds of the internal array.
61 Value (me; Index : Integer from Standard)
62 ---Purpose: Returns the value of the <Index>th element of the array
64 ---C++: return const &
65 ---C++: alias operator ()
66 returns ExtendedString from TCollection;
68 Lower (me) returns Integer from Standard;
69 ---Purpose: Return the lower bound.
71 Upper (me) returns Integer from Standard;
72 ---Purpose: Return the upper bound
74 Length (me) returns Integer from Standard;
75 ---Purpose: Return the number of elements of <me>.
77 ChangeArray(me : mutable; newArray : HArray1OfExtendedString from TColStd;
78 isCheckItems : Boolean = Standard_True);
79 ---Purpose: Sets the inner array <myValue> of the ExtStringArray attribute to <newArray>.
80 -- If value of <newArray> differs from <myValue>, Backup performed and myValue
81 -- refers to new instance of HArray1OfExtendedString that holds <newArray> values
82 -- If <isCheckItems> equal True each item of <newArray> will be checked with each
83 -- item of <myValue> for coincidence (to avoid backup).
85 Array(me) returns HArray1OfExtendedString from TColStd;
86 ---Purpose: Return the inner array of the ExtStringArray attribute
90 GetDelta(me) returns Boolean from Standard;
93 SetDelta(me : mutable; isDelta : Boolean from Standard);
95 ---Purpose: for internal use only!
97 RemoveArray(me : mutable) is private;
100 ---Category: methodes of TDF_Attribute
101 -- =========================
103 Create returns ExtStringArray from TDataStd;
106 ---C++: return const &
107 returns GUID from Standard;
109 Restore (me: mutable; With : Attribute from TDF);
112 returns Attribute from TDF;
114 Paste (me; Into : Attribute from TDF;
115 RT : RelocationTable from TDF);
117 Dump(me; anOS : in out OStream from Standard)
118 returns OStream from Standard
122 ---Category: methods to be added for using in DeltaOn Modification
123 -- =====================================================
124 DeltaOnModification(me; anOldAttribute : Attribute from TDF)
125 returns DeltaOnModification from TDF
126 ---Purpose : Makes a DeltaOnModification between <me> and
128 is redefined virtual;
132 myValue : HArray1OfExtendedString from TColStd;
133 myIsDelta : Boolean from Standard;
136 class DeltaOnModificationOfExtStringArray from TDataStd