1 | |
---|
2 | #ifndef __EBMEXPR_H__ |
---|
3 | #define __EBMEXPR_H__ |
---|
4 | |
---|
5 | #include <list> |
---|
6 | #include "Ebm.h" |
---|
7 | |
---|
8 | |
---|
9 | class Ebm; |
---|
10 | |
---|
11 | class EbmExpr : public Ebm { |
---|
12 | private: |
---|
13 | OperatorType _operator; // operateur de ce noeud |
---|
14 | std::list<Ebm*> _operands; // pointeurs sur les operandes |
---|
15 | public: |
---|
16 | EbmExpr ( OperatorType, std::list<Ebm*>& operands ); |
---|
17 | virtual ~EbmExpr (); |
---|
18 | static EbmExpr* Not ( Ebm* ); |
---|
19 | static EbmExpr* Or ( Ebm*, Ebm* ); |
---|
20 | static EbmExpr* Or ( Ebm*, Ebm*, Ebm* ); |
---|
21 | static EbmExpr* Or ( Ebm*, Ebm*, Ebm*, Ebm* ); |
---|
22 | static EbmExpr* Xor ( Ebm*, Ebm* ); |
---|
23 | static EbmExpr* Xor ( Ebm*, Ebm*, Ebm* ); |
---|
24 | static EbmExpr* Xor ( Ebm*, Ebm*, Ebm*, Ebm* ); |
---|
25 | static EbmExpr* And ( Ebm*, Ebm* ); |
---|
26 | static EbmExpr* And ( Ebm*, Ebm*, Ebm* ); |
---|
27 | static EbmExpr* And ( Ebm*, Ebm*, Ebm*, Ebm* ); |
---|
28 | public: |
---|
29 | virtual Ebm::Type getType (); |
---|
30 | inline OperatorType getOperator (); |
---|
31 | inline std::list<Ebm*>& getOperands (); |
---|
32 | }; |
---|
33 | |
---|
34 | |
---|
35 | inline Ebm::OperatorType EbmExpr::getOperator () { return _operator; } |
---|
36 | inline std::list<Ebm*>& EbmExpr::getOperands () { return _operands; } |
---|
37 | |
---|
38 | |
---|
39 | #endif // __EBMEXPR_H__ |
---|
40 | |
---|