b311480e |
1 | -- Created on: 2007-05-29 |
2 | -- Created by: Vlad Romashko |
973c2be1 |
3 | -- Copyright (c) 2007-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 ByteArray from TDataStd inherits Attribute from TDF |
17 | |
18 | ---Purpose: An array of Byte (unsigned char) values. |
19 | |
20 | uses |
21 | GUID from Standard, |
22 | Attribute from TDF, |
23 | Label from TDF, |
24 | RelocationTable from TDF, |
25 | DeltaOnModification from TDF, |
26 | HArray1OfByte from TColStd |
27 | |
28 | is |
29 | |
30 | ---Purpose: Static methods |
31 | -- ============== |
32 | |
33 | GetID (myclass) |
34 | ---C++: return const & |
35 | ---Purpose: Returns an ID for array. |
36 | returns GUID from Standard; |
37 | |
38 | Set (myclass; |
39 | label : Label from TDF; |
40 | lower, upper : Integer from Standard; |
41 | isDelta : Boolean from Standard = Standard_False) |
42 | ---Purpose: Finds or creates an attribute with the array. |
43 | -- If <isDelta> == False, DefaultDeltaOnModification is used. |
44 | -- If attribute is already set, all input parameters are refused |
45 | -- and the found attribute is returned. |
46 | returns ByteArray from TDataStd; |
47 | |
48 | |
49 | ---Category: ByteArray methods |
50 | -- ================= |
51 | |
52 | Init (me : mutable; |
53 | lower, upper : Integer from Standard); |
54 | ---Purpose: Initialize the inner array with bounds from <lower> to <upper> |
55 | |
56 | SetValue (me : mutable; |
57 | index :Integer from Standard; |
58 | value : Byte from Standard); |
59 | ---Purpose: Sets the <Index>th element of the array to <Value> |
fa13a85d |
60 | -- OutOfRange exception is raised if <Index> doesn't respect Lower and Upper bounds of the internal array. |
7fd59977 |
61 | |
62 | Value (me; |
63 | Index : Integer from Standard) |
64 | ---Purpose: Return the value of the <Index>th element of the array. |
65 | ---C++: alias operator () |
66 | returns Byte from Standard; |
67 | |
68 | Lower (me) |
69 | ---Purpose: Returns the lower boundary of the array. |
70 | returns Integer from Standard; |
71 | |
72 | Upper (me) |
73 | ---Purpose: Returns the upper boundary of the array. |
74 | returns Integer from Standard; |
75 | |
76 | Length (me) |
77 | ---Purpose: Returns the number of elements in the array. |
78 | returns Integer from Standard; |
79 | |
80 | |
81 | ---Category: Advanced area |
82 | -- ============= |
83 | |
84 | InternalArray (me) |
85 | ---C++: return const |
86 | ---C++: inline |
87 | returns HArray1OfByte from TColStd; |
88 | |
89 | ChangeArray (me : mutable; |
90 | newArray : HArray1OfByte from TColStd; |
91 | isCheckItems : Boolean = Standard_True); |
92 | ---Purpose: Sets the inner array <myValue> of the attribute to |
93 | -- <newArray>. If value of <newArray> differs from <myValue>, Backup performed |
94 | -- and myValue refers to new instance of HArray1OfInteger that holds <newArray> |
95 | -- values. |
96 | -- If <isCheckItems> equal True each item of <newArray> will be checked with each |
97 | -- item of <myValue> for coincidence (to avoid backup). |
98 | |
99 | GetDelta(me) returns Boolean from Standard; |
100 | ---C++: inline |
101 | |
102 | SetDelta(me : mutable; isDelta : Boolean from Standard); |
103 | ---C++: inline |
104 | ---Purpose: for internal use only! |
105 | |
106 | RemoveArray(me : mutable) is private; |
107 | ---C++: inline |
108 | |
109 | |
110 | ---Category: Methodes of TDF_Attribute |
111 | -- ========================= |
112 | Create |
6e33d3ce |
113 | returns ByteArray from TDataStd; |
7fd59977 |
114 | |
115 | ID (me) |
116 | ---C++: return const & |
117 | returns GUID from Standard; |
118 | |
119 | Restore (me: mutable; |
120 | with : Attribute from TDF); |
121 | |
122 | NewEmpty (me) |
6e33d3ce |
123 | returns Attribute from TDF; |
7fd59977 |
124 | |
6e33d3ce |
125 | Paste (me; into : Attribute from TDF; |
126 | RT : RelocationTable from TDF); |
7fd59977 |
127 | |
128 | Dump (me; |
129 | OS : in out OStream from Standard) |
130 | returns OStream from Standard |
131 | is redefined; |
132 | ---C++: return & |
133 | |
134 | ---Category: methods to be added for using in DeltaOn Modification |
135 | -- ===================================================== |
136 | DeltaOnModification(me; anOldAttribute : Attribute from TDF) |
137 | returns DeltaOnModification from TDF |
138 | ---Purpose : Makes a DeltaOnModification between <me> and |
139 | -- <anOldAttribute>. |
140 | is redefined virtual; |
141 | |
142 | |
143 | |
144 | fields |
145 | |
146 | myValue : HArray1OfByte from TColStd; |
147 | myIsDelta : Boolean from Standard; |
148 | |
149 | friends |
150 | class DeltaOnModificationOfByteArray from TDataStd |
151 | |
152 | end ByteArray; |