1 -- Created on: 1992-11-25
2 -- Created by: Julia DOROVSKIKH
3 -- Copyright (c) 1992-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.
22 generic class Array1 from XmlObjMgt (Item as Storable)
24 ---Purpose: The class Array1 represents unidimensionnal
25 -- array of fixed size known at run time.
26 -- The range of the index is user defined.
27 -- Warning: Programs clients of such class must be independant
28 -- of the range of the first element. Then, a C++ for
29 -- loop must be written like this
30 -- for (i = A->Lower(); i <= A->Upper(); i++)
32 Element from XmlObjMgt,
33 DOMString from XmlObjMgt
36 Create (Low, Up: Integer from Standard) returns Array1;
37 ---Purpose: Create an array of lower bound <Low> and
38 -- upper bound <Up>. Range error is raised
39 -- when <Up> is less than <Low>.
41 Create (theParent: Element from XmlObjMgt;
42 theName: DOMString from XmlObjMgt) returns Array1;
43 ---Purpose: for restoration from DOM_Element which is child of
48 CreateArrayElement (me:in out; theParent: in out Element from XmlObjMgt;
49 theName : DOMString from XmlObjMgt);
50 ---Purpose: Create DOM_Element representing the array, under 'theParent'
52 Element(me) returns Element from XmlObjMgt
54 ---Purpose: Returns the DOM element of <me>.
57 ---C++: return const &
59 Length (me) returns Integer from Standard
61 ---Purpose: Returns the number of elements of <me>.
65 Lower (me) returns Integer from Standard
67 ---Purpose: Returns the lower bound.
71 Upper (me) returns Integer from Standard
73 ---Purpose: Returns the upper bound.
77 SetValue (me: in out; Index: Integer from Standard;
78 Value: in out Element from XmlObjMgt)
80 ---Purpose: Set the <Index>th element of the array to <Value>.
83 Value (me; Index: Integer from Standard) returns Element from XmlObjMgt
85 ---Purpose: Returns the value of <Index>th element of the array.
89 myElement : Element from XmlObjMgt;
90 myFirst : Integer from Standard;
91 myLast : Integer from Standard;