0024234: occt master is not compiled by VC++ 2005 (vc8 32/64 bit TKBO)
[occt.git] / src / XmlObjMgt / XmlObjMgt_Array1.cdl
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
5 --
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.
10 --
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.
13 --
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.
20
21
22 generic class Array1 from XmlObjMgt  (Item as Storable) 
23
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++)
31 uses 
32     Element     from XmlObjMgt,
33     DOMString   from XmlObjMgt
34
35 is
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>.
40
41     Create (theParent:  Element from XmlObjMgt;
42             theName:    DOMString from XmlObjMgt) returns Array1;
43             ---Purpose: for restoration from DOM_Element which is child of
44             --          theParent:
45             --             <theParent ...>
46             --                 <theName ...>
47
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'
51
52     Element(me) returns Element from XmlObjMgt
53                 is static;
54                 ---Purpose:  Returns the DOM element of <me>.
55                 ---Level: Public
56                 ---C++: inline
57                 ---C++: return const &
58
59     Length (me) returns Integer from Standard
60                 is static;
61                 ---Purpose:  Returns the number of elements of <me>.
62                 ---Level: Public
63                 ---C++: inline
64
65     Lower (me) returns Integer from Standard
66                 is static;
67                 ---Purpose: Returns the lower bound.
68                 ---Level: Public
69                 ---C++: inline
70
71     Upper (me) returns Integer from Standard
72                 is static;
73                 ---Purpose: Returns the upper bound.
74                 ---Level: Public
75                 ---C++: inline
76
77     SetValue (me: in out; Index: Integer from Standard;
78                           Value: in out Element from XmlObjMgt) 
79                 is static;
80                 ---Purpose: Set the <Index>th element of the array to <Value>.
81                 ---Level: Public
82
83     Value (me; Index: Integer from Standard) returns Element from XmlObjMgt
84                 is static;
85                 ---Purpose: Returns the value of <Index>th element of the array.
86                 ---Level: Public
87
88 fields 
89     myElement   : Element from XmlObjMgt;
90     myFirst     : Integer from Standard;
91     myLast      : Integer from Standard;
92
93 end Array1;