00001 #ifndef _STREE_LIST_H_ 00002 #define _STREE_LIST_H_ 00003 00004 #include <list> 00005 00006 #include "streenode.h" 00007 00009 00010 class List : public Node, public list<Node*> 00011 { 00012 protected: 00014 string name; 00015 00017 List *copyContent(List *newList) const; 00018 00019 public: 00020 00021 virtual SType getType() const { return SList; }; 00022 virtual string getName() const { return name; }; 00023 00025 virtual int getLength() const { return size(); }; 00026 00028 List(string iname); 00029 00031 List(string iname, Node *statement); 00032 00034 virtual List* push_back(Node *statement); 00035 00037 virtual List* push_front(Node *statement); 00038 00040 List* append(List* toappend); 00041 00042 virtual ostream& print(ostream &os) const; 00043 00044 virtual ostream& php(ostream &os) const; 00045 00046 virtual bool match(const Node *p, Assignment &assign, const NameSpace &nameSpace) const; 00047 00048 virtual bool matchToBegining(const List *p, Assignment &assign, const NameSpace &nameSpace) const; 00049 00050 virtual bool compare(const Node *p) const; 00051 00052 virtual Node* copy() const; 00053 00055 List* copyList() const; 00056 00058 virtual ~List(); 00059 00060 virtual void getVariables(VariableList &vlist) const; 00061 00062 virtual Node* transform(const Transformer* transformer); 00063 00064 virtual bool forall(const Tester* tester, const NameSpace &nameSpace) const; 00065 00066 virtual bool exists(const Tester* tester, const NameSpace &nameSpace) const; 00067 00068 virtual Node* substitute(const Assignment &assign); 00069 00070 virtual string evaluate(const NameSpace &nameSpace) const; 00071 }; 00072 00073 #endif 00074