First work on Kraken! Basic node tree system re-written from WTS-Language, can output .gv files of the node tree.

This commit is contained in:
Nathan Braswell
2013-05-11 16:13:46 -04:00
parent ced3f3ea37
commit 46d59ac595
5 changed files with 186 additions and 1 deletions

40
include/NodeTree.h Normal file
View File

@@ -0,0 +1,40 @@
#ifndef NODETREE_H
#define NODETREE_H
#ifndef NULL
#define NULL 0
#endif NULL
#include <vector>
#include <string>
class NodeTree {
public:
NodeTree();
NodeTree(std::string name);
~NodeTree();
void setParent(NodeTree* parent);
NodeTree* getParent();
void addChild(NodeTree* child);
int findChild(NodeTree* child);
void removeChild(NodeTree* child);
void removeChild(int index);
NodeTree* get(int index);
std::string getName();
void setName(std::string);
int size();
std::string DOTGraphString();
private:
std::string DOTGraphStringHelper();
std::string name;
NodeTree* parent;
std::vector<NodeTree*> children;
};
#endif //NODETREE_H