741d34c30161d204ce5c470b0f101d37ab5efb01
[occt.git] / src / Dynamic / Dynamic_Variable.cdl
1 -- Created on: 1994-08-24
2 -- Created by: Gilles DEBARBOUILLE
3 -- Copyright (c) 1994-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 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.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class Variable from Dynamic
18 inherits
19
20     TShared from MMgt
21     
22
23         ---Purpose: This  class   is the  root   class for  describing
24         --          variables.  A   variable is useful to  specify the
25         --          signature of a method in terms of arguments and if
26         --          necessary variables and/or constants needed inside
27         --          a  function.   This  set  of information defines a
28         --          scope for  these variables. This class is directly
29         --          used   by  the MethodDefinition class.   From this
30         --          class is  derived the instances of variables which
31         --          are used by the  classes under the  MethodInstance
32         --          class. A variable is composed by :
33         --          
34         --          * an identifier for giving it a name,
35         --          * a type of expected value,
36         --          * possibly a default value,
37         --          * a mode which explains if the variable is :
38         --          
39         --            - an input and/or output argument to the method,
40         --            - an internal or  constant variable used in  the
41         --            body of the method.
42
43 uses
44
45     OStream from Standard,
46     Parameter from Dynamic,
47     ModeEnum  from Dynamic 
48     
49
50 is
51
52     Create returns mutable Variable from Dynamic;
53     
54     ---Level: Advanced 
55     
56     ---Purpose: Creates and returns an empty instance of this class.
57     
58     Parameter(me : mutable ; aparameter : Parameter from Dynamic)
59     
60     ---Level: Advanced 
61     
62     ---Purpose: Sets  the   parameter  <aparameter>   in  <me>.   This
63     --          parameter gives the name,  the  type of value, and  if
64     --          necessary the default value of the variable.
65     
66     is static;
67     
68     Parameter(me) returns any Parameter from Dynamic
69     
70     ---Level: Advanced 
71     
72     ---Purpose: Returns the parameter stored in <me>.
73     
74     is static;
75     
76     Mode(me : mutable ; amode : ModeEnum from Dynamic)
77     
78     ---Level: Advanced 
79     
80     ---Purpose: Sets the mode to the variable. the  mode is to take in
81     --          the enumeration  IN,  OUT, INOUT,  INTERNAL, CONSTANT,
82     --          which describes the type of the variable.
83     
84     is static;
85     
86     Mode(me) returns ModeEnum from Dynamic
87     
88     ---Level: Advanced 
89     
90     ---Purpose: Returns the mode of the variable.
91     
92     is static;
93     
94     Dump(me; astream : in out OStream from Standard);
95
96     ---Level: Internal 
97     
98     ---Purpose: Useful for debugging.
99     
100 fields
101
102     theparameter    : Parameter from Dynamic;
103     themode         : ModeEnum  from Dynamic;
104
105 end Variable;