0024545: Convertation of the generic classes to the non-generic (XmlObjMgt).
[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-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
8 -- This library is free software; you can redistribute it and / or modify it
9 -- under the terms of the GNU Lesser General Public 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.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class Array1 from XmlObjMgt
18
19         ---Purpose: The class Array1 represents unidimensionnal 
20         -- array of fixed size known at run time. 
21         -- The range of the index is user defined.
22         --  Warning: Programs clients of such class must be independant
23         -- of the range of the first element. Then, a C++ for
24         -- loop must be written like this
25         --     for (i = A->Lower(); i <= A->Upper(); i++)
26 uses 
27     Element     from XmlObjMgt,
28     DOMString   from XmlObjMgt
29
30 is
31     Create (Low, Up: Integer from Standard) returns Array1;
32             ---Purpose: Create an array of lower bound <Low> and 
33             -- upper bound <Up>. Range error is raised 
34             -- when <Up> is less than <Low>.
35
36     Create (theParent:  Element from XmlObjMgt;
37             theName:    DOMString from XmlObjMgt) returns Array1;
38             ---Purpose: for restoration from DOM_Element which is child of
39             --          theParent:
40             --             <theParent ...>
41             --                 <theName ...>
42
43     CreateArrayElement (me:in out; theParent: in out Element from XmlObjMgt;
44                                    theName  : DOMString from XmlObjMgt);
45         ---Purpose: Create DOM_Element representing the array, under 'theParent'
46
47     Element(me) returns Element from XmlObjMgt
48                 is static;
49                 ---Purpose:  Returns the DOM element of <me>.
50                 ---Level: Public
51                 ---C++: inline
52                 ---C++: return const &
53
54     Length (me) returns Integer from Standard
55                 is static;
56                 ---Purpose:  Returns the number of elements of <me>.
57                 ---Level: Public
58                 ---C++: inline
59
60     Lower (me) returns Integer from Standard
61                 is static;
62                 ---Purpose: Returns the lower bound.
63                 ---Level: Public
64                 ---C++: inline
65
66     Upper (me) returns Integer from Standard
67                 is static;
68                 ---Purpose: Returns the upper bound.
69                 ---Level: Public
70                 ---C++: inline
71
72     SetValue (me: in out; Index: Integer from Standard;
73                           Value: in out Element from XmlObjMgt) 
74                 is static;
75                 ---Purpose: Set the <Index>th element of the array to <Value>.
76                 ---Level: Public
77
78     Value (me; Index: Integer from Standard) returns Element from XmlObjMgt
79                 is static;
80                 ---Purpose: Returns the value of <Index>th element of the array.
81                 ---Level: Public
82
83 fields 
84     myElement   : Element from XmlObjMgt;
85     myFirst     : Integer from Standard;
86     myLast      : Integer from Standard;
87
88 end Array1;