97 |
} |
} |
98 |
|
|
99 |
//! Writes *this to the output os. |
//! Writes *this to the output os. |
100 |
virtual std::ostream& put(std::ostream& os) = 0; |
virtual std::ostream& put(std::ostream& os) const = 0; |
101 |
|
|
102 |
public: |
public: |
103 |
//! return the type. |
//! return the type. |
104 |
const Expression::Type& type() const |
const Expression::Type& type() const |
112 |
virtual void execute() = 0; |
virtual void execute() = 0; |
113 |
|
|
114 |
//! this function allows to output expressions. |
//! this function allows to output expressions. |
115 |
friend std::ostream& operator<< (std::ostream& os, Expression& e) |
friend std::ostream& operator<< (std::ostream& os, const Expression& e) |
116 |
{ |
{ |
117 |
return e.put(os); |
return e.put(os); |
118 |
} |
} |