1 -- Created on: 1999-06-16
2 -- Created by: Sergey RUIN
3 -- Copyright (c) 1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
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
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class IntegerArray from TDataStd inherits Attribute from TDF
19 ---Purpose: Contains an array of integers.
23 HArray1OfInteger from TColStd,
26 DeltaOnModification from TDF,
27 RelocationTable from TDF
31 ---Purpose: class methods
35 ---C++: return const &
36 ---Purpose: Returns the GUID for arrays of integers.
37 returns GUID from Standard;
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> an integer array attribute
42 -- with 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, all input parameters are refused and the found
46 -- attribute is returned.
47 returns IntegerArray from TDataStd;
50 ---Category: IntegerArray methods
53 Init(me : mutable; lower, upper : Integer from Standard);
54 ---Purpose: Initialize the inner array with bounds from <lower> to <upper>
56 SetValue (me : mutable; Index, Value : Integer from Standard);
57 ---Purpose: Sets the <Index>th element of the array to <Value>
58 -- OutOfRange exception is raised if <Index> doesn't respect Lower and Upper bounds of the internal array.
60 Value (me; Index : Integer from Standard)
61 ---Purpose: Return the value of the <Index>th element of the array
63 ---C++: alias operator ()
64 returns Integer from Standard;
66 Lower (me) returns Integer from Standard;
67 ---Purpose: Returns the lower boundary of this array of integers.
69 Upper (me) returns Integer from Standard;
70 ---Purpose: Return the upper boundary of this array of integers.
72 Length (me) returns Integer from Standard;
73 ---Purpose: Returns the length of this array of integers in
74 -- terms of the number of elements it contains.
76 ChangeArray(me : mutable; newArray : HArray1OfInteger from TColStd;
77 isCheckItems : Boolean = Standard_True);
78 ---Purpose: Sets the inner array <myValue> of the IntegerArray attribute to
79 -- <newArray>. If value of <newArray> differs from <myValue>, Backup performed
80 -- and myValue refers to new instance of HArray1OfInteger that holds <newArray>
82 -- If <isCheckItems> equal True each item of <newArray> will be checked with each
83 -- item of <myValue> for coincidence (to avoid backup).
85 Array(me) returns HArray1OfInteger from TColStd;
86 ---Purpose: Return the inner array of the IntegerArray attribute
90 GetDelta(me) returns Boolean from Standard;
93 SetDelta(me : mutable; isDelta : Boolean from Standard);
95 ---Purpose: for internal use only!
97 RemoveArray(me : mutable) is private;
101 ---Category: methodes of TDF_Attribute
102 -- =========================
104 Create returns IntegerArray from TDataStd;
107 ---C++: return const &
108 returns GUID from Standard;
110 Restore (me: mutable; With : Attribute from TDF);
113 returns Attribute from TDF;
115 Paste (me; Into : Attribute from TDF;
116 RT : RelocationTable from TDF);
117 ---Purpose: Note. Uses inside ChangeArray() method
119 Dump(me; anOS : in out OStream from Standard)
120 returns OStream from Standard
124 ---Category: methods to be added for using in DeltaOn Modification
125 -- =====================================================
126 DeltaOnModification(me; anOldAttribute : Attribute from TDF)
127 returns DeltaOnModification from TDF
128 ---Purpose : Makes a DeltaOnModification between <me> and
130 is redefined virtual;
137 myValue : HArray1OfInteger from TColStd;
138 myIsDelta : Boolean from Standard;
141 class DeltaOnModificationOfIntArray from TDataStd