00001 #ifndef _STREE_NAMED_LIST_H_ 00002 #define _STREE_NAMED_LIST_H_ 00003 00004 #include "streelist.h" 00005 00007 class NamedList : public List{ 00008 public: 00010 NamedList(string name); 00012 NamedList(string name,Node *statement); 00013 }; 00014 00015 00017 class Nullary : public List{ 00018 public: 00020 Nullary(string name); 00021 00022 virtual ostream& php(ostream &os) const; 00023 00024 virtual Node* copy() const; 00025 }; 00026 00028 class Unary : public List{ 00029 public: 00031 Unary(string name,Node* statement); 00032 00034 Node* getStatement1(); 00036 const Node* getStatement1() const; 00037 00038 virtual ostream& php(ostream &os) const; 00039 00040 virtual Node* copy() const; 00041 }; 00042 00044 class Binary : public List{ 00045 public: 00046 00048 Binary(string name,Node* statement1, Node* statement2) ; 00049 00051 Node* getStatement1() ; 00053 Node* getStatement2() ; 00054 00056 const Node* getStatement1() const; 00058 const Node* getStatement2() const; 00059 00060 virtual ostream& php(ostream &os) const; 00061 00062 virtual Node* copy() const; 00063 00064 }; 00065 00067 class Ternary : public List{ 00068 public: 00069 00071 Ternary(string name,Node* statement1, Node* statement2, Node* statement3) ; 00072 00074 Node* getStatement1() ; 00076 Node* getStatement2() ; 00078 Node* getStatement3() ; 00079 00081 const Node* getStatement1() const; 00083 const Node* getStatement2() const; 00085 const Node* getStatement3() const; 00086 00087 virtual ostream& php(ostream &os) const; 00088 00089 virtual Node* copy() const; 00090 }; 00091 00093 class Quadary : public List{ 00094 public: 00096 Quadary(string name,Node* statement1, Node* statement2, Node* statement3, Node* statement4) ; 00097 00099 Node* getStatement1(); 00101 Node* getStatement2(); 00103 Node* getStatement3(); 00105 Node* getStatement4(); 00106 00108 const Node* getStatement1() const; 00110 const Node* getStatement2() const; 00112 const Node* getStatement3() const; 00114 const Node* getStatement4() const; 00115 00116 virtual ostream& php(ostream &os) const; 00117 00118 virtual Node* copy() const; 00119 }; 00120 00121 #endif