#ifndef NODE_H #define NODE_H NODE_H #include #include #include #include "util/refptr.h" 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 uint64_t getInteger() { return 0x0ULL; } virtual std::string getString() { return ""; } virtual void process(FILE * out) { } protected: std::vector< refptr > m_children; }; class IntegerNode : public Node { public: IntegerNode(uint64_t integer) { m_integer = integer; } unsigned long getInteger() { return m_integer; } protected: uint64_t m_integer; }; 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