b311480e |
1 | -- Created on: 1999-06-16 |
2 | -- Created by: Sergey RUIN |
3 | -- Copyright (c) 1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
d5f74e42 |
8 | -- This library is free software; you can redistribute it and/or modify it under |
9 | -- the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
10 | -- by the Free Software Foundation, with special exception defined in the file |
11 | -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | -- distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class RealArray from TDataStd inherits Attribute from TDF |
18 | |
19 | ---Purpose: A framework for an attribute composed of a real number array. |
20 | |
21 | uses |
22 | HArray1OfReal from TColStd, |
23 | GUID from Standard, |
24 | Attribute from TDF, |
25 | Label from TDF, |
26 | DeltaOnModification from TDF, |
27 | RelocationTable from TDF |
28 | |
29 | is |
30 | |
31 | ---Purpose: class methods |
32 | -- ============= |
33 | |
34 | GetID (myclass) |
35 | ---C++: return const & |
36 | ---Purpose: Returns the GUID for arrays of reals. |
37 | returns GUID from Standard; |
38 | |
39 | Set (myclass; label : Label from TDF; lower, upper : Integer from Standard; |
40 | isDelta : Boolean from Standard = Standard_False) |
41 | ---Purpose: Finds or creates on the <label> a real array attribute |
42 | -- with the specified <lower> and <upper> boundaries. |
43 | -- If attribute is already set, all input parameters are refused and the found |
44 | -- attribute is returned. |
45 | returns RealArray from TDataStd; |
46 | |
47 | |
48 | ---Category: RealArray methods |
49 | -- =============== |
50 | |
51 | Init(me : mutable; lower, upper : Integer from Standard); |
52 | ---Purpose: Initialize the inner array with bounds from <lower> to <upper> |
53 | |
54 | SetValue (me : mutable; Index :Integer from Standard; Value : Real from Standard); |
55 | ---Purpose: Sets the <Index>th element of the array to <Value> |
fa13a85d |
56 | -- OutOfRange exception is raised if <Index> doesn't respect Lower and Upper bounds of the internal array. |
7fd59977 |
57 | |
58 | Value (me; Index : Integer from Standard) |
59 | ---Purpose: Return the value of the <Index>th element of the array |
60 | -- |
61 | ---C++: alias operator () |
62 | returns Real from Standard; |
63 | |
64 | Lower (me) returns Integer from Standard; |
65 | ---Purpose: Returns the lower boundary of the array. |
66 | |
67 | Upper (me) returns Integer from Standard; |
68 | ---Purpose: Returns the upper boundary of the array. |
69 | |
70 | Length (me) returns Integer from Standard; |
71 | ---Purpose: Returns the number of elements of the array of reals |
72 | -- in terms of the number of elements it contains. |
73 | |
74 | ChangeArray(me : mutable; newArray : HArray1OfReal from TColStd; |
75 | isCheckItems : Boolean = Standard_True); |
76 | ---Purpose: Sets the inner array <myValue> of the RealArray attribute |
77 | -- to <newArray>. If value of <newArray> differs from <myValue>, |
78 | -- Backup performed and myValue refers to new instance of HArray1OfReal |
79 | -- that holds <newArray> values |
80 | -- If <isCheckItems> equal True each item of <newArray> will be checked with each |
81 | -- item of <myValue> for coincidence (to avoid backup). |
82 | |
83 | Array(me) returns HArray1OfReal from TColStd; |
84 | ---Purpose: Returns the handle of this array of reals. |
85 | ---C++: inline |
86 | ---C++: return const |
87 | |
88 | GetDelta(me) returns Boolean from Standard; |
89 | ---C++: inline |
90 | |
91 | SetDelta(me : mutable; isDelta : Boolean from Standard); |
92 | ---C++: inline |
93 | ---Purpose: for internal use only! |
94 | |
95 | RemoveArray(me : mutable) is private; |
96 | ---C++: inline |
97 | |
98 | ---Category: methodes of TDF_Attribute |
99 | -- ========================= |
100 | Create |
6e33d3ce |
101 | returns RealArray from TDataStd; |
7fd59977 |
102 | |
103 | ID (me) |
104 | ---C++: return const & |
105 | returns GUID from Standard; |
106 | |
107 | Restore (me: mutable; With : Attribute from TDF); |
108 | |
109 | NewEmpty (me) |
6e33d3ce |
110 | returns Attribute from TDF; |
7fd59977 |
111 | |
6e33d3ce |
112 | Paste (me; Into : Attribute from TDF; |
113 | RT : RelocationTable from TDF); |
7fd59977 |
114 | ---Purpose: Note. Uses inside ChangeArray() method |
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 DeltaOnModification |
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 | fields |
129 | |
130 | myValue : HArray1OfReal from TColStd; |
131 | myIsDelta : Boolean from Standard; |
132 | |
133 | friends |
134 | |
135 | class DeltaOnModificationOfRealArray from TDataStd |
136 | |
137 | end RealArray; |