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>
62 -- OutOfRange exception is raised if <Index> doesn't respect Lower and Upper bounds of the internal array.
64 Value (me; Index : Integer from Standard)
65 ---Purpose: Return the value of the <Index>th element of the array
67 ---C++: alias operator ()
68 returns Real from Standard;
70 Lower (me) returns Integer from Standard;
71 ---Purpose: Returns the lower boundary of the array.
73 Upper (me) returns Integer from Standard;
74 ---Purpose: Returns the upper boundary of the array.
76 Length (me) returns Integer from Standard;
77 ---Purpose: Returns the number of elements of the array of reals
78 -- in terms of the number of elements it contains.
80 ChangeArray(me : mutable; newArray : HArray1OfReal from TColStd;
81 isCheckItems : Boolean = Standard_True);
82 ---Purpose: Sets the inner array <myValue> of the RealArray attribute
83 -- to <newArray>. If value of <newArray> differs from <myValue>,
84 -- Backup performed and myValue refers to new instance of HArray1OfReal
85 -- that holds <newArray> values
86 -- If <isCheckItems> equal True each item of <newArray> will be checked with each
87 -- item of <myValue> for coincidence (to avoid backup).
89 Array(me) returns HArray1OfReal from TColStd;
90 ---Purpose: Returns the handle of this array of reals.
94 GetDelta(me) returns Boolean from Standard;
97 SetDelta(me : mutable; isDelta : Boolean from Standard);
99 ---Purpose: for internal use only!
101 RemoveArray(me : mutable) is private;
104 ---Category: methodes of TDF_Attribute
105 -- =========================
107 returns mutable RealArray from TDataStd;
110 ---C++: return const &
111 returns GUID from Standard;
113 Restore (me: mutable; With : Attribute from TDF);
116 returns mutable Attribute from TDF;
118 Paste (me; Into : mutable Attribute from TDF;
119 RT : mutable RelocationTable from TDF);
120 ---Purpose: Note. Uses inside ChangeArray() method
122 Dump(me; anOS : in out OStream from Standard)
123 returns OStream from Standard
127 ---Category: methods to be added for using in DeltaOnModification
128 -- =====================================================
129 DeltaOnModification(me; anOldAttribute : Attribute from TDF)
130 returns DeltaOnModification from TDF
131 ---Purpose : Makes a DeltaOnModification between <me> and
133 is redefined virtual;
136 myValue : HArray1OfReal from TColStd;
137 myIsDelta : Boolean from Standard;
141 class DeltaOnModificationOfRealArray from TDataStd