0024830: Remove redundant keyword 'mutable' in CDL declarations
[occt.git] / src / Expr / Expr_NumericValue.cdl
1 -- Created on: 1991-01-10
2 -- Created by: Arnaud BOUZY
3 -- Copyright (c) 1991-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 NumericValue from Expr
18
19 inherits GeneralExpression from Expr  
20
21     ---Purpose: This class describes any reel value defined in an 
22     --          expression. 
23
24 uses AsciiString from TCollection,
25     Array1OfNamedUnknown from Expr,
26     Array1OfReal from TColStd,
27     NamedUnknown from Expr
28
29
30 raises OutOfRange from Standard
31
32 is
33
34     Create(val : Real)
35     ---Level: Advanced
36     returns NumericValue;
37
38     GetValue(me)
39     ---Level: Advanced
40     returns Real;
41
42     SetValue(me : mutable; val : Real);
43     ---Level: Internal
44
45     NbSubExpressions(me)
46     ---Purpose: Returns the number of sub-expressions contained
47     --          in <me> ( >= 0)
48     returns Integer
49     is static;
50
51     SubExpression(me; I : Integer)
52     ---Purpose: Returns the <I>-th sub-expression of <me>
53     --          raises OutOfRange if <I> > NbSubExpressions(me)
54     ---C++: return const &
55     returns any GeneralExpression
56     raises OutOfRange
57     is static;
58
59     Simplified(me) 
60     ---Purpose: Returns a GeneralExpression after replacement of
61     --          NamedUnknowns by an associated expression and after
62     --          values computation.
63     returns any GeneralExpression;
64
65     ShallowSimplified(me)
66     ---Purpose: Returns a GeneralExpression after a simplification 
67     --          of the arguments of <me>.
68     returns any GeneralExpression;
69
70     Copy(me)
71     ---Purpose: Returns a copy of <me> having the same unknowns and functions.
72     returns like me;
73     
74     ContainsUnknowns(me) 
75     ---Purpose: Tests if <me> contains NamedUnknown.
76     returns Boolean
77     is static;
78
79     Contains(me; exp : GeneralExpression)
80     ---Purpose: Tests if <exp> is contained in <me>.
81     returns Boolean
82     is static;
83
84     IsIdentical(me; Other : GeneralExpression)
85     ---Purpose: Tests if <me> and <Other> define the same expression.
86     --          This method does not include any simplification before
87     --          testing.
88     returns Boolean;
89
90     IsLinear(me)
91     returns Boolean
92     is static;
93
94     Derivative(me; X : NamedUnknown)
95     ---Purpose: Returns the derivative on <X> unknown of <me> 
96     returns any GeneralExpression;
97
98     NDerivative(me; X : NamedUnknown; N : Integer)
99     ---Purpose: Returns the <N>-th derivative on <X> unknown of <me>.
100     --          Raises OutOfRange if <N> <= 0
101     returns any GeneralExpression
102     raises OutOfRange
103     is redefined;
104
105     Replace(me : mutable ; var : NamedUnknown ; with : GeneralExpression);
106     ---Purpose: Replaces all occurences of <var> with <with> in <me>
107     
108     Evaluate(me; vars : Array1OfNamedUnknown; vals : Array1OfReal)
109     ---Purpose: Returns the value of <me> (as a Real) by 
110     --          replacement of <vars> by <vals>.
111     returns Real;
112
113     String(me)
114     ---Purpose: returns a string representing <me> in a readable way.
115     returns AsciiString;
116
117 fields 
118
119     myValue : Real;
120
121 end NumericValue;