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:
40
include/NodeTree.h
Normal file
40
include/NodeTree.h
Normal 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
|
||||
Reference in New Issue
Block a user