#ifndef NODES_H #define NODES_H NODES_H #include "util/refptr.h" #include #include class Node { public: virtual ~Node(); void addChild(refptr child) { m_children.push_back(child); } void addChildren(refptr other); std::vector< refptr > & getChildren() { return m_children; } virtual std::string getString() { return ""; } protected: std::vector< refptr > m_children; }; class StringNode : public Node { public: StringNode(const std::string & str) { m_string = str; } std::string getString() { return m_string; } protected: std::string m_string; }; #endif