1 #ifndef H_GENERATE_BABY 2 #define H_GENERATE_BABY 18 const std::string & Name()
const;
21 std::string Type()
const;
22 std::string Type(
const std::string &baby_type)
const;
23 std::string DecoratedType()
const;
24 std::string DecoratedType(
const std::string &baby_type)
const;
26 bool HasEntry(
const std::string &baby_type)
const;
27 void SetEntry(
const std::string &baby_type,
28 const std::string &type);
30 bool ImplementInBase()
const;
31 bool VirtualInBase()
const;
32 bool ImplementIn(
const std::string &baby_type)
const;
33 bool NotInBase()
const;
34 bool EverythingIn(
const std::string &baby_type)
const;
39 std::set<std::string> GetTypeSet()
const;
45 std::set<Variable>
GetVariables(
const std::set<std::string> &files);
54 const std::set<std::string> &types);
59 const std::string &type);
62 const std::string &type);
65 const std::set<std::string> &types);
void RemoveExtraSpaces(std::string &line)
Removes leading, trailing, and double spaced from a text line.
SimpleVariable(const std::string &type, const std::string &name)
Standard constructor.
std::string type_
Type of variable (e.g., int, float, etc.)
void WriteSpecializedHeader(const std::set< Variable > &vars, const std::string &type)
Writes a derived Baby header file.
bool IsComment(const std::string &line)
Check if line in variable list file is a comment (blank)
NamedFunc operator<(NamedFunc f, NamedFunc g)
Gets NamedFunc which tests if result of f is less than result of g.
void WriteBaseSource(const std::set< Variable > &vars)
Writes src/baby.cpp.
std::set< Variable > GetVariables(const std::set< std::string > &files)
SimpleVariable GetVariable(std::string line)
Extracts variable type and name from line from variable text files.
void WriteMergedHeader(const std::set< Variable > &vars, const std::set< std::string > &types)
Pairs a type and name of a variable accessible via Baby.
std::map< std::string, std::string > type_map_
Map from Baby type (basic, full, etc.) to variabl type (int, float, etc.)
void WriteBaseHeader(const std::set< Variable > &vars, const std::set< std::string > &types)
Writes inc/baby.hpp.
std::string name_
Name of variable (e.g., ht, met, etc.)
void WriteSpecializedSource(const std::set< Variable > &vars, const std::string &type)
Writes a derived Baby source file.
std::string name_
Name of variable (e.g., ht, met, etc.)
A variable to be accessible in Baby classes.