1 -- Created on: 1999-06-16
2 -- Created by: Sergey RUIN
3 -- Copyright (c) 1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
23 class RealArray from TDataStd inherits Attribute from TDF
25 ---Purpose: A framework for an attribute composed of a real number array.
28 HArray1OfReal from TColStd,
32 DeltaOnModification from TDF,
33 RelocationTable from TDF
37 ---Purpose: class methods
41 ---C++: return const &
42 ---Purpose: Returns the GUID for arrays of reals.
43 returns GUID from Standard;
45 Set (myclass; label : Label from TDF; lower, upper : Integer from Standard;
46 isDelta : Boolean from Standard = Standard_False)
47 ---Purpose: Finds or creates on the <label> a real array attribute
48 -- with the specified <lower> and <upper> boundaries.
49 -- If attribute is already set, all input parameters are refused and the found
50 -- attribute is returned.
51 returns RealArray from TDataStd;
54 ---Category: RealArray methods
57 Init(me : mutable; lower, upper : Integer from Standard);
58 ---Purpose: Initialize the inner array with bounds from <lower> to <upper>
60 SetValue (me : mutable; Index :Integer from Standard; Value : Real from Standard);
61 ---Purpose: Sets the <Index>th element of the array to <Value>
63 Value (me; Index : Integer from Standard)
64 ---Purpose: Return the value of the <Index>th element of the array
66 ---C++: alias operator ()
67 returns Real from Standard;
69 Lower (me) returns Integer from Standard;
70 ---Purpose: Returns the lower boundary of the array.
72 Upper (me) returns Integer from Standard;
73 ---Purpose: Returns the upper boundary of the array.
75 Length (me) returns Integer from Standard;
76 ---Purpose: Returns the number of elements of the array of reals
77 -- in terms of the number of elements it contains.
79 ChangeArray(me : mutable; newArray : HArray1OfReal from TColStd;
80 isCheckItems : Boolean = Standard_True);
81 ---Purpose: Sets the inner array <myValue> of the RealArray attribute
82 -- to <newArray>. If value of <newArray> differs from <myValue>,
83 -- Backup performed and myValue refers to new instance of HArray1OfReal
84 -- that holds <newArray> values
85 -- If <isCheckItems> equal True each item of <newArray> will be checked with each
86 -- item of <myValue> for coincidence (to avoid backup).
88 Array(me) returns HArray1OfReal from TColStd;
89 ---Purpose: Returns the handle of this array of reals.
93 GetDelta(me) returns Boolean from Standard;
96 SetDelta(me : mutable; isDelta : Boolean from Standard);
98 ---Purpose: for internal use only!
100 RemoveArray(me : mutable) is private;
103 ---Category: methodes of TDF_Attribute
104 -- =========================
106 returns mutable RealArray from TDataStd;
109 ---C++: return const &
110 returns GUID from Standard;
112 Restore (me: mutable; With : Attribute from TDF);
115 returns mutable Attribute from TDF;
117 Paste (me; Into : mutable Attribute from TDF;
118 RT : mutable RelocationTable from TDF);
119 ---Purpose: Note. Uses inside ChangeArray() method
121 Dump(me; anOS : in out OStream from Standard)
122 returns OStream from Standard
126 ---Category: methods to be added for using in DeltaOnModification
127 -- =====================================================
128 DeltaOnModification(me; anOldAttribute : Attribute from TDF)
129 returns DeltaOnModification from TDF
130 ---Purpose : Makes a DeltaOnModification between <me> and
132 is redefined virtual;
135 myValue : HArray1OfReal from TColStd;
136 myIsDelta : Boolean from Standard;
140 class DeltaOnModificationOfRealArray from TDataStd