Electroneum
Public Member Functions | Private Member Functions | Private Attributes | List of all members
crow::mustache::template_t Class Reference

#include <mustache.h>

Public Member Functions

 template_t (std::string body)
 
std::string render ()
 
std::string render (context &ctx)
 

Private Member Functions

std::string tag_name (const Action &action)
 
auto find_context (const std::string &name, const std::vector< context *> &stack) -> std::pair< bool, context &>
 
void escape (const std::string &in, std::string &out)
 
void render_internal (int actionBegin, int actionEnd, std::vector< context *> &stack, std::string &out, int indent)
 
void render_fragment (const std::pair< int, int > fragment, int indent, std::string &out)
 
void parse ()
 

Private Attributes

std::vector< std::pair< int, int > > fragments_
 
std::vector< Actionactions_
 
std::string body_
 

Constructor & Destructor Documentation

◆ template_t()

crow::mustache::template_t::template_t ( std::string  body)
inline

Member Function Documentation

◆ escape()

void crow::mustache::template_t::escape ( const std::string &  in,
std::string &  out 
)
inlineprivate

◆ find_context()

auto crow::mustache::template_t::find_context ( const std::string &  name,
const std::vector< context *> &  stack 
) -> std::pair<bool, context&>
inlineprivate

◆ parse()

void crow::mustache::template_t::parse ( )
inlineprivate

◆ render() [1/2]

std::string crow::mustache::template_t::render ( )
inline

◆ render() [2/2]

std::string crow::mustache::template_t::render ( context ctx)
inline

◆ render_fragment()

void crow::mustache::template_t::render_fragment ( const std::pair< int, int >  fragment,
int  indent,
std::string &  out 
)
inlineprivate

◆ render_internal()

void crow::mustache::template_t::render_internal ( int  actionBegin,
int  actionEnd,
std::vector< context *> &  stack,
std::string &  out,
int  indent 
)
inlineprivate

◆ tag_name()

std::string crow::mustache::template_t::tag_name ( const Action action)
inlineprivate

Member Data Documentation

◆ actions_

std::vector<Action> crow::mustache::template_t::actions_
private

◆ body_

std::string crow::mustache::template_t::body_
private

◆ fragments_

std::vector<std::pair<int,int> > crow::mustache::template_t::fragments_
private

The documentation for this class was generated from the following file: