#ifndef NODE_H #define NODE_H #include "Util.h" #include namespace xml { enum NodeType { nodeUnknown, nodeElement, nodeComment, nodeText }; class Node { protected: NodeType nodeType; std::string nodeName; std::vector childNodes; public: explicit Node(NodeType nodeType); virtual ~Node(); virtual std::istream& load(std::istream& in) = 0; virtual std::ostream& print(std::ostream& out, int depth = 0) const = 0; private: DECLARE_COPY_METHODS(Node) }; inline std::istream& operator>>(std::istream& in, Node& node) { return node.load(in); } inline std::ostream& operator<<(std::ostream& out, const Node& node) { return node.print(out); } } // namespace xml #endif // NODE_H