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 IntegerArray from TDataStd inherits Attribute from TDF
25 ---Purpose: Contains an array of integers.
29 HArray1OfInteger 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 integers.
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> an integer array attribute
48 -- with the specified <lower> and <upper> boundaries.
49 -- If <isDelta> == False, DefaultDeltaOnModification is used.
50 -- If attribute is already set, all input parameters are refused and the found
51 -- attribute is returned.
52 returns IntegerArray from TDataStd;
55 ---Category: IntegerArray methods
58 Init(me : mutable; lower, upper : Integer from Standard);
59 ---Purpose: Initialize the inner array with bounds from <lower> to <upper>
61 SetValue (me : mutable; Index, Value : Integer from Standard);
62 ---Purpose: Sets the <Index>th element of the array to <Value>
63 -- OutOfRange exception is raised if <Index> doesn't respect Lower and Upper bounds of the internal array.
65 Value (me; Index : Integer from Standard)
66 ---Purpose: Return the value of the <Index>th element of the array
68 ---C++: alias operator ()
69 returns Integer from Standard;
71 Lower (me) returns Integer from Standard;
72 ---Purpose: Returns the lower boundary of this array of integers.
74 Upper (me) returns Integer from Standard;
75 ---Purpose: Return the upper boundary of this array of integers.
77 Length (me) returns Integer from Standard;
78 ---Purpose: Returns the length of this array of integers in
79 -- terms of the number of elements it contains.
81 ChangeArray(me : mutable; newArray : HArray1OfInteger from TColStd;
82 isCheckItems : Boolean = Standard_True);
83 ---Purpose: Sets the inner array <myValue> of the IntegerArray attribute to
84 -- <newArray>. If value of <newArray> differs from <myValue>, Backup performed
85 -- and myValue refers to new instance of HArray1OfInteger that holds <newArray>
87 -- If <isCheckItems> equal True each item of <newArray> will be checked with each
88 -- item of <myValue> for coincidence (to avoid backup).
90 Array(me) returns HArray1OfInteger from TColStd;
91 ---Purpose: Return the inner array of the IntegerArray attribute
95 GetDelta(me) returns Boolean from Standard;
98 SetDelta(me : mutable; isDelta : Boolean from Standard);
100 ---Purpose: for internal use only!
102 RemoveArray(me : mutable) is private;
106 ---Category: methodes of TDF_Attribute
107 -- =========================
109 Create returns mutable IntegerArray from TDataStd;
112 ---C++: return const &
113 returns GUID from Standard;
115 Restore (me: mutable; With : Attribute from TDF);
118 returns mutable Attribute from TDF;
120 Paste (me; Into : mutable Attribute from TDF;
121 RT : mutable RelocationTable from TDF);
122 ---Purpose: Note. Uses inside ChangeArray() method
124 Dump(me; anOS : in out OStream from Standard)
125 returns OStream from Standard
129 ---Category: methods to be added for using in DeltaOn Modification
130 -- =====================================================
131 DeltaOnModification(me; anOldAttribute : Attribute from TDF)
132 returns DeltaOnModification from TDF
133 ---Purpose : Makes a DeltaOnModification between <me> and
135 is redefined virtual;
142 myValue : HArray1OfInteger from TColStd;
143 myIsDelta : Boolean from Standard;
146 class DeltaOnModificationOfIntArray from TDataStd