C++ main module for gpm Package  1.0
MATH_UnaryOperator.h
Go to the documentation of this file.
1 #ifndef MATH_UnaryOperator_H
2 #define MATH_UnaryOperator_H
3 
4 #include "MATH_Operator.h"
5 
14 
18  SP_OBJECT(MATH_UnaryOperator);
19 
20  // ATTRIBUTES
21 private:
22 
23  //ASSOCIATIONS
24 private:
25  SP::MATH_BinaryOperator mBinaryOperator;
26 
27 
28  protected:
29  // METHODS
30 
31  // CONSTRUCTORS
32 
35  MATH_UnaryOperator(void);
36 
37 
38 
39  // DESTRUCTORS
40 
41 
44  virtual ~MATH_UnaryOperator(void);
45 
46 
47  private:
48 
49 public:
50 
51 
52  // SET methods
53 protected:
56  void setAssociatedBinaryOperator(SP::MATH_BinaryOperator op) {
57  mBinaryOperator=op;
58  }
59 
60  // GET methods
61 public:
64  SP::MATH_BinaryOperator getAssociatedBinaryOperator() {
65  SP::MATH_BinaryOperator p=mBinaryOperator;
66  return p;
67  }
91 
92  public:
93  // OTHERS methods
96  virtual tString toString() const;
97 };
98 
99 #endif
DEFINE_SPTR(MATH_BinaryOperator)
void setAssociatedBinaryOperator(SP::MATH_BinaryOperator op)
et the associated binary operator
Definition: MATH_UnaryOperator.h:56
MATH_UnaryOperator(void)
create
Definition: MATH_UnaryOperator.cpp:7
This class is the base class of a math expression.
Definition: MATH_Expression.h:24
This class decribes an operator with a name.
Definition: MATH_Operator.h:15
SP::MATH_BinaryOperator getAssociatedBinaryOperator()
get the associated binary operator
Definition: MATH_UnaryOperator.h:64
virtual MATH_ChildExpression * insertInTree(MATH_Expression *tree, MATH_Environment &symbols, tString &expr)
insert the node This in tree & erase the This corresponding character in expr
Definition: MATH_UnaryOperator.cpp:14
This class decribes a binary operator.
Definition: MATH_BinaryOperator.h:15
This class is a children of a parent expression.
Definition: MATH_ChildExpression.h:23
virtual tString toString() const
return the string representation of the class
Definition: MATH_UnaryOperator.cpp:56
#define tString
Definition: types.h:36
This class decribes an unary operator wiath is associated to a binary operator which replaces it if n...
Definition: MATH_UnaryOperator.h:17
DEFINE_SVPTR(MATH_UnaryOperator)
This class decribes an environment class.
Definition: MATH_Environment.h:14
virtual ~MATH_UnaryOperator(void)
destroy
Definition: MATH_UnaryOperator.cpp:11