Backup() is not efficient in TDataStd array attributes.
[occt.git] / src / TDataStd / TDataStd_RealArray.cdl
CommitLineData
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
17class RealArray from TDataStd inherits Attribute from TDF
18
19 ---Purpose: A framework for an attribute composed of a real number array.
20
21uses
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
29is
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)
4057f898 41 ---Purpose: Finds or creates on the <label> a real array attribute with
42 -- the specified <lower> and <upper> boundaries.
43 -- If <isDelta> == False, DefaultDeltaOnModification is used.
44 -- If <isDelta> == True, DeltaOnModification of the current attribute is used.
45 -- If attribute is already set, input parameter <isDelta> is refused and the found
46 -- attribute returned.
7fd59977 47 returns RealArray from TDataStd;
48
49
50 ---Category: RealArray methods
51 -- ===============
52
53 Init(me : mutable; lower, upper : Integer from Standard);
54 ---Purpose: Initialize the inner array with bounds from <lower> to <upper>
55
56 SetValue (me : mutable; Index :Integer from Standard; Value : Real from Standard);
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: Return the value of the <Index>th element of the array
62 --
63 ---C++: alias operator ()
64 returns Real from Standard;
65
66 Lower (me) returns Integer from Standard;
67 ---Purpose: Returns the lower boundary of the array.
68
69 Upper (me) returns Integer from Standard;
70 ---Purpose: Returns the upper boundary of the array.
71
72 Length (me) returns Integer from Standard;
73 ---Purpose: Returns the number of elements of the array of reals
74 -- in terms of the number of elements it contains.
75
76 ChangeArray(me : mutable; newArray : HArray1OfReal from TColStd;
77 isCheckItems : Boolean = Standard_True);
78 ---Purpose: Sets the inner array <myValue> of the RealArray attribute
79 -- to <newArray>. If value of <newArray> differs from <myValue>,
80 -- Backup performed and myValue refers to new instance of HArray1OfReal
81 -- that holds <newArray> values
82 -- If <isCheckItems> equal True each item of <newArray> will be checked with each
83 -- item of <myValue> for coincidence (to avoid backup).
84
85 Array(me) returns HArray1OfReal from TColStd;
86 ---Purpose: Returns the handle of this array of reals.
87 ---C++: inline
88 ---C++: return const
89
90 GetDelta(me) returns Boolean from Standard;
91 ---C++: inline
92
93 SetDelta(me : mutable; isDelta : Boolean from Standard);
94 ---C++: inline
95 ---Purpose: for internal use only!
96
97 RemoveArray(me : mutable) is private;
98 ---C++: inline
99
100 ---Category: methodes of TDF_Attribute
101 -- =========================
102 Create
6e33d3ce 103 returns RealArray from TDataStd;
7fd59977 104
105 ID (me)
106 ---C++: return const &
107 returns GUID from Standard;
108
109 Restore (me: mutable; With : Attribute from TDF);
110
111 NewEmpty (me)
6e33d3ce 112 returns Attribute from TDF;
7fd59977 113
6e33d3ce 114 Paste (me; Into : Attribute from TDF;
115 RT : RelocationTable from TDF);
7fd59977 116 ---Purpose: Note. Uses inside ChangeArray() method
117
118 Dump(me; anOS : in out OStream from Standard)
119 returns OStream from Standard
120 is redefined;
121 ---C++: return &
122
123 ---Category: methods to be added for using in DeltaOnModification
124 -- =====================================================
125 DeltaOnModification(me; anOldAttribute : Attribute from TDF)
126 returns DeltaOnModification from TDF
127 ---Purpose : Makes a DeltaOnModification between <me> and
128 -- <anOldAttribute>.
129 is redefined virtual;
130fields
131
132 myValue : HArray1OfReal from TColStd;
133 myIsDelta : Boolean from Standard;
134
135friends
136
137 class DeltaOnModificationOfRealArray from TDataStd
138
139end RealArray;