BcPOC
SF-HRP ASM implementation
D:/bcatch/bcpoc_src/bcpoc/src/sfhrp/SFHRP/condition_nodes.hpp
Go to the documentation of this file.
00001 #ifndef _CONDITION_NODES_
00002 #define _CONDITION_NODES_
00003 
00004 //common ancestor to all node classes
00005 class CNodeBase {
00006 public:
00007         CNodeBase();
00008         virtual ~CNodeBase();
00009 
00010         bool GetValue();
00011         virtual void Reevaluate() = 0;
00012         void SetParent(CNodeBase*);
00013 
00014 protected:
00015         bool m_value;
00016         CNodeBase* m_parent;
00017 };
00018 
00019 class CNodeAnd : public CNodeBase {
00020 
00021 public:
00022         CNodeAnd(CNodeBase*, CNodeBase*);
00023         ~CNodeAnd();
00024 
00025         void Reevaluate();
00026 
00027 private:
00028         //operands
00029         CNodeBase* m_lchild;
00030         CNodeBase* m_rchild;
00031 
00032 };
00033 
00034 class CNodeOr : public CNodeBase {
00035 public:
00036         CNodeOr(CNodeBase*, CNodeBase*);
00037         ~CNodeOr();
00038 
00039         virtual void Reevaluate();
00040 private:
00041         //operands
00042         CNodeBase* m_lchild;
00043         CNodeBase* m_rchild;
00044 
00045 };
00046 
00047 class CNodeNot : public CNodeBase {
00048 public:
00049         CNodeNot(CNodeBase*);
00050         ~CNodeNot();
00051 
00052         virtual void Reevaluate();
00053 private:
00054         //operand
00055         CNodeBase* m_child;
00056 
00057         bool m_first;
00058 };
00059 
00060 struct CElement : public CNodeBase {
00061 public:
00062         void SetValue(bool);
00063 
00064         virtual void Reevaluate();
00065 private:
00066 
00067 };
00068 
00069 #endif
00070