[ozulis] now deleting some fields in AST's destructors
[ozulis.git] / src / ozulis / generators / generator.hh
blob79461638a0d1e2dc2391f672d2cc9564456c7bf8
1 #ifndef GENERATOR_HH
2 # define GENERATOR_HH
4 # include <string>
5 # include <vector>
7 namespace ozulis
9 namespace ast
11 namespace generator
13 struct Attribute
15 const std::string type;
16 const std::string name;
19 struct Node
21 const std::string name;
22 const std::string parent;
23 const std::string description;
24 const Attribute attrs[100];
27 extern const Node nodes[];
29 bool isNode(const std::string & type);
30 bool isVectorOfNode(const std::string & type);
31 bool isPrintable(const std::string & type);
32 bool needsDelete(const std::string & type);
33 const Node * findNodeByName(const std::string & name);
34 std::vector<const Attribute *> allAttributes(const Node * node);
35 void appendGeneratedWarning(std::ostream & out);
36 std::string deref(std::string type);
41 # define NL << std::endl
43 extern template class std::vector<ozulis::ast::generator::Attribute *>;
45 #endif /* !GENERATOR_HH */