ICG 2
Electric Boogaloo
ClassInfo.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <map>
4 #include <vector>
5 #include <unordered_set>
6 
7 #include "utils.hpp"
10 
16 public:
17  ClassInfo();
18  ClassInfo(std::string n);
19 
20 
26  public:
27  BaseInfo(std::string name);
28  std::string name;
31  std::string toString() const override;
32  };
33 
34 
35  // Rule of 5 is default
36 
37  std::string name;
38  std::vector<FieldInfo> fields;
39  std::vector<BaseInfo> base_classes;
40  std::vector<std::string> template_args;
41 
44  std::string toString() const override;
45 
46  std::unordered_set<std::string> getStlMembers() const;
47 
48 };
Represent a base class.
Definition: ClassInfo.hpp:25
ICGTemplateEngine::Dictionary toDictionary() const override
Get a map of token name -> token value for this object.
Definition: ClassInfo.cpp:106
std::string toString() const override
Get a string representation.
Definition: ClassInfo.cpp:119
ICGTemplateEngine::ListTokenItems nextLevel() const override
Get the value of any recursable objects nested in this one. May return empty if this is a "leaf".
Definition: ClassInfo.cpp:115
BaseInfo(std::string name)
Definition: ClassInfo.cpp:104
std::string name
Definition: ClassInfo.hpp:28
Hold information about a class declaration.
Definition: ClassInfo.hpp:15
std::unordered_set< std::string > getStlMembers() const
Definition: ClassInfo.cpp:90
std::vector< BaseInfo > base_classes
Definition: ClassInfo.hpp:39
ClassInfo()
Definition: ClassInfo.cpp:8
std::string name
Definition: ClassInfo.hpp:37
std::string toString() const override
Get a string representation.
Definition: ClassInfo.cpp:52
std::vector< FieldInfo > fields
Definition: ClassInfo.hpp:38
ICGTemplateEngine::Dictionary toDictionary() const override
Get a map of token name -> token value for this object.
Definition: ClassInfo.cpp:11
ICGTemplateEngine::ListTokenItems nextLevel() const override
Get the value of any recursable objects nested in this one. May return empty if this is a "leaf".
Definition: ClassInfo.cpp:34
std::vector< std::string > template_args
Definition: ClassInfo.hpp:40
An interface for an object that has some attributes that should be used in a list_ token,...
Definition: ICGTemplateEngine.hpp:35
std::map< std::string, std::vector< const recursable * > > ListTokenItems
Lists that we can recurse into.
Definition: ICGTemplateEngine.hpp:23
std::map< std::string, std::string > Dictionary
Map of token name to string it should be replaced with.
Definition: ICGTemplateEngine.hpp:21