b311480e |
1 | -- Created on: 1991-01-10 |
2 | -- Created by: Arnaud BOUZY |
3 | -- Copyright (c) 1991-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 | |
7fd59977 |
21 | |
22 | deferred class BinaryExpression from Expr |
23 | |
24 | inherits GeneralExpression from Expr |
25 | ---Purpose: Defines all binary expressions. The order of the two |
26 | -- operands is significant. |
27 | |
28 | uses NamedUnknown from Expr |
29 | |
30 | raises OutOfRange from Standard, |
31 | NumericError from Standard, |
32 | InvalidOperand from Expr |
33 | |
34 | is |
35 | |
36 | FirstOperand(me) |
37 | ---C++: inline |
38 | ---C++: return const & |
39 | ---Level : Internal |
40 | returns any GeneralExpression |
41 | is static; |
42 | |
43 | SecondOperand(me) |
44 | ---C++: inline |
45 | ---C++: return const & |
46 | ---Level : Internal |
47 | returns any GeneralExpression |
48 | is static; |
49 | |
50 | SetFirstOperand(me : mutable; exp : GeneralExpression) |
51 | ---Purpose: Sets first operand of <me> |
52 | -- Raises InvalidOperand if exp = me |
53 | ---Level : Internal |
54 | raises InvalidOperand |
55 | is static; |
56 | |
57 | SetSecondOperand(me : mutable; exp : GeneralExpression) |
58 | ---Purpose: Sets second operand of <me> |
59 | -- Raises InvalidOperand if <exp> contains <me>. |
60 | ---Level : Internal |
61 | raises InvalidOperand |
62 | is static; |
63 | |
64 | CreateFirstOperand(me : mutable; exp : GeneralExpression) |
65 | ---Purpose: Sets first operand of <me> |
66 | ---Level : Internal |
67 | is static protected; |
68 | |
69 | CreateSecondOperand(me : mutable; exp : GeneralExpression) |
70 | ---Purpose: Sets second operand of <me> |
71 | -- Raises InvalidOperand if <exp> contains <me>. |
72 | ---Level : Internal |
73 | is static protected; |
74 | |
75 | NbSubExpressions(me) |
76 | ---Purpose: returns the number of sub-expressions contained |
77 | -- in <me> ( >= 0) |
78 | returns Integer |
79 | is static; |
80 | |
81 | SubExpression(me; I : Integer) |
82 | ---Purpose: returns the <I>-th sub-expression of <me> |
83 | -- raises OutOfRange if <I> > NbSubExpressions(me) |
84 | ---C++: return const & |
85 | returns any GeneralExpression |
86 | raises OutOfRange |
87 | is static; |
88 | |
89 | ContainsUnknowns(me) |
90 | ---Purpose: Does <me> contain NamedUnknown ? |
91 | returns Boolean |
92 | is static; |
93 | |
94 | Contains(me; exp : GeneralExpression) |
95 | ---Purpose: Tests if <me> contains <exp>. |
96 | returns Boolean |
97 | is static; |
98 | |
99 | Replace(me : mutable ; var : NamedUnknown ; with : GeneralExpression) |
100 | ---Purpose: Replaces all occurences of <var> with <with> in <me>. |
101 | -- Raises InvalidOperand if <with> contains <me>. |
102 | raises InvalidOperand |
103 | is static; |
104 | |
105 | Simplified(me) |
106 | ---Purpose: Returns a GeneralExpression after replacement of |
107 | -- NamedUnknowns by an associated expression and after |
108 | -- values computation. |
109 | returns any GeneralExpression |
110 | raises NumericError; |
111 | |
112 | fields |
113 | |
114 | myFirstOperand : GeneralExpression; |
115 | mySecondOperand : GeneralExpression; |
116 | |
117 | end BinaryExpression; |