Electroneum
Classes | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
mstch::render_context Class Reference

#include <render_context.hpp>

Classes

class  push
 

Public Member Functions

 render_context (const mstch::node &node, const std::map< std::string, template_type > &partials)
 
const mstch::nodeget_node (const std::string &token)
 
std::string render (const template_type &templt, const std::string &prefix="")
 
std::string render_partial (const std::string &partial_name, const std::string &prefix)
 
template<class T , class... Args>
void set_state (Args &&... args)
 

Private Member Functions

const mstch::nodefind_node (const std::string &token, std::list< node const *> current_nodes)
 

Private Attributes

std::map< std::string, template_typem_partials
 
std::deque< mstch::nodem_nodes
 
std::list< const mstch::node * > m_node_ptrs
 
std::stack< std::unique_ptr< render_state > > m_state
 

Static Private Attributes

static const mstch::node null_node
 

Constructor & Destructor Documentation

◆ render_context()

render_context::render_context ( const mstch::node node,
const std::map< std::string, template_type > &  partials 
)

Member Function Documentation

◆ find_node()

const mstch::node & render_context::find_node ( const std::string &  token,
std::list< node const *>  current_nodes 
)
private

◆ get_node()

const mstch::node & render_context::get_node ( const std::string &  token)

◆ render()

std::string render_context::render ( const template_type templt,
const std::string &  prefix = "" 
)

◆ render_partial()

std::string render_context::render_partial ( const std::string &  partial_name,
const std::string &  prefix 
)

◆ set_state()

template<class T , class... Args>
void mstch::render_context::set_state ( Args &&...  args)
inline

Member Data Documentation

◆ m_node_ptrs

std::list<const mstch::node*> mstch::render_context::m_node_ptrs
private

◆ m_nodes

std::deque<mstch::node> mstch::render_context::m_nodes
private

◆ m_partials

std::map<std::string, template_type> mstch::render_context::m_partials
private

◆ m_state

std::stack<std::unique_ptr<render_state> > mstch::render_context::m_state
private

◆ null_node

const mstch::node render_context::null_node
staticprivate

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