6 #include <unordered_set>
29 typedef std::map<std::string, std::vector<const recursable *>>
ListTokenItems;
An interface for an object that has some attributes that should be used in a list_ token,...
Definition: ICGTemplateEngine.hpp:35
virtual ListTokenItems nextLevel() const =0
Get the value of any recursable objects nested in this one. May return empty if this is a "leaf".
virtual Dictionary toDictionary() const =0
Get a map of token name -> token value for this object.
virtual std::string toString() const =0
Get a string representation.
Definition: ICGTemplateEngine.hpp:14
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
std::string process(const std::string &template_to_fill, const Dictionary &token_dictionary, const ListTokenItems &recursable_map)
Definition: ICGTemplateEngine.cpp:83