7fd59977 |
1 | -- File: UnaryExpression.cdl |
2 | -- Created: Thu Jan 10 12:23:23 1991 |
3 | -- Author: Arnaud BOUZY |
4 | -- <adn@topsn3> |
5 | ---Copyright: Matra Datavision 1991 |
6 | |
7 | deferred class UnaryExpression from Expr |
8 | |
9 | inherits GeneralExpression from Expr |
10 | |
11 | uses NamedUnknown from Expr |
12 | |
13 | raises OutOfRange from Standard, |
14 | NumericError from Standard, |
15 | InvalidOperand from Expr |
16 | |
17 | is |
18 | |
19 | Operand(me) |
20 | ---Purpose: Returns the operand used |
21 | ---C++: inline |
22 | ---C++: return const & |
23 | ---Level : Internal |
24 | returns any GeneralExpression |
25 | is static; |
26 | |
27 | SetOperand(me : mutable; exp : GeneralExpression) |
28 | ---Purpose: Sets the operand used |
29 | -- Raises InvalidOperand if <exp> contains <me>. |
30 | ---Level : Internal |
31 | raises InvalidOperand |
32 | is static; |
33 | |
34 | CreateOperand(me : mutable; exp : GeneralExpression) |
35 | ---Purpose: Sets the operand used during creation |
36 | ---Level : Internal |
37 | is static protected; |
38 | |
39 | NbSubExpressions(me) |
40 | ---Purpose: Returns the number of sub-expressions contained |
41 | -- in <me> ( >= 0) |
42 | returns Integer |
43 | is static; |
44 | |
45 | SubExpression(me; I : Integer) |
46 | ---Purpose: Returns the <I>-th sub-expression of <me>. |
47 | -- Raises OutOfRange if <I> > NbSubExpressions(me) |
48 | ---C++: return const & |
49 | returns any GeneralExpression |
50 | raises OutOfRange |
51 | is static; |
52 | |
53 | ContainsUnknowns(me) |
54 | ---Purpose: Does <me> contains NamedUnknown ? |
55 | returns Boolean |
56 | is static; |
57 | |
58 | Contains(me; exp : GeneralExpression) |
59 | ---Purpose: Tests if <exp> is contained in <me>. |
60 | returns Boolean |
61 | is static; |
62 | |
63 | Replace(me : mutable ; var : NamedUnknown ; with : GeneralExpression) |
64 | ---Purpose: Replaces all occurences of <var> with <with> in <me> |
65 | -- Raises InvalidOperand if <with> contains <me>. |
66 | raises InvalidOperand |
67 | is static; |
68 | |
69 | Simplified(me) |
70 | ---Purpose: Returns a GeneralExpression after replacement of |
71 | -- NamedUnknowns by an associated expression, and after |
72 | -- values computation. |
73 | returns any GeneralExpression |
74 | raises NumericError; |
75 | |
76 | fields |
77 | |
78 | myOperand : GeneralExpression; |
79 | |
80 | end UnaryExpression; |
81 | |