SHARE
TWEET

Untitled

a guest Aug 7th, 2012 15 Never
  1. //A basic node class
  2. class BasicNode
  3. {
  4. public:
  5.         BasicNode* parent;
  6.         std::vector<BasicNode*> children;
  7.  
  8.         BasicNode();
  9.         ~BasicNode();
  10. };
  11.  
  12. //A node template class where nodes can have content
  13. template <typename T>
  14. class ContainerNode
  15. {
  16. public:
  17.         ContainerNode<T>* parent;
  18.         std::vector<ContainerNode<T>*> children;
  19.         T content;
  20.  
  21.         ContainerNode(void) { };
  22.         ~ContainerNode(void) { };
  23. };
RAW Paste Data
Top