b311480e |
1 | -- Created on: 2002-01-16 |
2 | -- Created by: Michael PONIKAROV |
973c2be1 |
3 | -- Copyright (c) 2002-2014 OPEN CASCADE SAS |
b311480e |
4 | -- |
973c2be1 |
5 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
6 | -- |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
12 | -- |
973c2be1 |
13 | -- Alternatively, this file may be used under the terms of Open CASCADE |
14 | -- commercial license or contractual agreement. |
7fd59977 |
15 | |
16 | class ExtStringArray from TDataStd inherits Attribute from TDF |
17 | |
18 | ---Purpose: ExtStringArray Attribute. Handles an |
19 | -- array of UNICODE strings (represented by the |
20 | -- TCollection_ExtendedString class). |
21 | |
22 | uses GUID from Standard, |
23 | ExtendedString from TCollection, |
24 | HArray1OfExtendedString from TColStd, |
25 | Attribute from TDF, |
26 | Label from TDF, |
27 | DeltaOnModification from TDF, |
28 | RelocationTable from TDF |
29 | |
30 | is |
31 | |
32 | ---Purpose: class methods |
33 | -- ============= |
34 | |
35 | GetID (myclass) |
36 | ---C++: return const & |
37 | ---Purpose: Returns the GUID for the attribute. |
38 | returns GUID from Standard; |
39 | |
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; |
48 | |
49 | |
50 | ---Category: ExtStringArray methods |
51 | -- =============== |
52 | |
53 | Init(me : mutable; lower, upper : Integer from Standard); |
54 | ---Purpose: Initializes the inner array with bounds from <lower> to <upper> |
55 | |
56 | SetValue (me : mutable; Index : Integer from Standard; Value : ExtendedString from TCollection); |
57 | ---Purpose: Sets the <Index>th element of the array to <Value> |
fa13a85d |
58 | -- OutOfRange exception is raised if <Index> doesn't respect Lower and Upper bounds of the internal array. |
7fd59977 |
59 | |
60 | Value (me; Index : Integer from Standard) |
61 | ---Purpose: Returns the value of the <Index>th element of the array |
62 | -- |
bbd04806 |
63 | ---C++: return const & |
7fd59977 |
64 | ---C++: alias operator () |
65 | returns ExtendedString from TCollection; |
66 | |
67 | Lower (me) returns Integer from Standard; |
68 | ---Purpose: Return the lower bound. |
69 | |
70 | Upper (me) returns Integer from Standard; |
71 | ---Purpose: Return the upper bound |
72 | |
73 | Length (me) returns Integer from Standard; |
74 | ---Purpose: Return the number of elements of <me>. |
75 | |
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). |
83 | |
84 | Array(me) returns HArray1OfExtendedString from TColStd; |
85 | ---Purpose: Return the inner array of the ExtStringArray attribute |
86 | ---C++: inline |
87 | ---C++: return const |
88 | |
89 | GetDelta(me) returns Boolean from Standard; |
90 | ---C++: inline |
91 | |
92 | SetDelta(me : mutable; isDelta : Boolean from Standard); |
93 | ---C++: inline |
94 | ---Purpose: for internal use only! |
95 | |
96 | RemoveArray(me : mutable) is private; |
97 | ---C++: inline |
98 | |
99 | ---Category: methodes of TDF_Attribute |
100 | -- ========================= |
101 | |
6e33d3ce |
102 | Create returns ExtStringArray from TDataStd; |
7fd59977 |
103 | |
104 | ID (me) |
105 | ---C++: return const & |
106 | returns GUID from Standard; |
107 | |
108 | Restore (me: mutable; With : Attribute from TDF); |
109 | |
110 | NewEmpty (me) |
6e33d3ce |
111 | returns Attribute from TDF; |
7fd59977 |
112 | |
6e33d3ce |
113 | Paste (me; Into : Attribute from TDF; |
114 | RT : RelocationTable from TDF); |
7fd59977 |
115 | |
116 | Dump(me; anOS : in out OStream from Standard) |
117 | returns OStream from Standard |
118 | is redefined; |
119 | ---C++: return & |
120 | |
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 |
126 | -- <anOldAttribute>. |
127 | is redefined virtual; |
128 | |
129 | fields |
130 | |
131 | myValue : HArray1OfExtendedString from TColStd; |
132 | myIsDelta : Boolean from Standard; |
133 | |
134 | friends |
135 | class DeltaOnModificationOfExtStringArray from TDataStd |
136 | |
137 | end ExtStringArray; |