ra4_macros  bede988c286599a3a84b77a4d788ac0a971e89f9
generate_small_tree.hpp
Go to the documentation of this file.
1 #ifndef H_GENERATE_SMALL_TREE
2 #define H_GENERATE_SMALL_TREE
3 
4 #include <vector>
5 #include <set>
6 #include <string>
7 
8 class Variable{
9 public:
11  type_(""),
12  name_(""){
13  }
14 
15  Variable(const std::string &type,
16  const std::string &name):
17  type_(type),
18  name_(name){
19  }
20 
21  bool operator<(const Variable& var) const{
22  return type_<var.type_ || (type_==var.type_ && name_<var.name_);
23  }
24 
25  std::string type_, name_;
26 };
27 
28 bool Contains(const std::string &text, const std::string &pattern);
29 
30 void WriteBaseHeader(const std::set<Variable> &all_vars,
31  const std::set<Variable> &com_vars,
32  const std::vector<std::string> &names);
33 void WriteBaseSource(const std::set<Variable> &all_vars,
34  const std::set<Variable> &com_vars,
35  const std::vector<std::string> &names);
36 void WriteSepHeader(const std::pair<std::string, std::set<Variable> > &vars);
37 void WriteSepSource(const std::pair<std::string, std::set<Variable> > &vars);
38 
41 void GenerateEventHandlerHeader(const std::string& name);
42 void GenerateEventHandlerSource(const std::string& name);
43 void GenerateEventHandlerMergeHeader(const std::vector<std::string> &names);
44 void GenerateEventHandlerMergeSource(const std::vector<std::string> &names);
45 
46 #endif
void WriteSepSource(const std::pair< std::string, std::set< Variable > > &vars)
bool Contains(const std::string &text, const std::string &pattern)
void GenerateEventHandlerSource(const std::string &name)
void WriteSepHeader(const std::pair< std::string, std::set< Variable > > &vars)
void GenerateEventHandlerBaseSource()
void WriteBaseSource(const std::set< Variable > &all_vars, const std::set< Variable > &com_vars, const std::vector< std::string > &names)
bool operator<(const Variable &var) const
Variable(const std::string &type, const std::string &name)
std::string type_
void WriteBaseHeader(const std::set< Variable > &all_vars, const std::set< Variable > &com_vars, const std::vector< std::string > &names)
void GenerateEventHandlerMergeSource(const std::vector< std::string > &names)
void GenerateEventHandlerMergeHeader(const std::vector< std::string > &names)
void GenerateEventHandlerHeader(const std::string &name)
std::string name_
void GenerateEventHandlerBaseHeader()