A mustache template object. More...
Public Member Functions | |
template_t (std::string body) | |
rendered_template | render () const |
Output a returnable template from this mustache template. More... | |
rendered_template | render (context &ctx) const |
Apply the values from the context provided and output a returnable template from this mustache template. More... | |
std::string | render_string () const |
Output a returnable template from this mustache template. More... | |
std::string | render_string (context &ctx) const |
Apply the values from the context provided and output a returnable template from this mustache template. More... | |
Private Member Functions | |
std::string | tag_name (const Action &action) const |
auto | find_context (const std::string &name, const std::vector< context * > &stack, bool shouldUseOnlyFirstStackValue=false) const -> std::pair< bool, context & > |
void | escape (const std::string &in, std::string &out) const |
bool | isTagInsideObjectBlock (const int ¤t, const std::vector< context * > &stack) const |
void | render_internal (int actionBegin, int actionEnd, std::vector< context * > &stack, std::string &out, int indent) const |
void | render_fragment (const std::pair< int, int > fragment, int indent, std::string &out) const |
void | parse () |
Private Attributes | |
std::vector< std::pair< int, int > > | fragments_ |
std::vector< Action > | actions_ |
std::string | body_ |
A mustache template object.
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inline |
Output a returnable template from this mustache template.
|
inline |
Apply the values from the context provided and output a returnable template from this mustache template.
|
inline |
Output a returnable template from this mustache template.
|
inline |
Apply the values from the context provided and output a returnable template from this mustache template.
|
inlineprivate |
|
private |
|
private |
|
private |