Electroneum
Namespaces | Classes | Typedefs | Functions
mstch Namespace Reference

Namespaces

 internal
 

Classes

struct  config
 
class  get_token
 
class  has_token
 
class  in_section
 
class  is_node_empty
 
class  outside_section
 
class  render_context
 
class  render_node
 
class  render_section
 
class  render_state
 
class  template_type
 
class  token
 

Typedefs

using node = boost::make_recursive_variant< std::nullptr_t, std::string, int, double, bool, uint64_t, int64_t, uint32_t, internal::lambda_t< boost::recursive_variant_ >, std::shared_ptr< internal::object_t< boost::recursive_variant_ > >, internal::map< const std::string, boost::recursive_variant_ >, std::vector< boost::recursive_variant_ > >::type
 
using object = internal::object_t< node >
 
using lambda = internal::lambda_t< node >
 
using map = internal::map< const std::string, node >
 
using array = std::vector< node >
 
using delim_type = std::pair< std::string, std::string >
 
using citer = std::string::const_iterator
 
using criter = std::string::const_reverse_iterator
 

Functions

std::string render (const std::string &tmplt, const node &root, const std::map< std::string, std::string > &partials=std::map< std::string, std::string >())
 
citer first_not_ws (citer begin, citer end)
 
citer first_not_ws (criter begin, criter end)
 
std::string html_escape (const std::string &str)
 
criter reverse (citer it)
 
template<class... Args>
auto visit (Args &&... args) -> decltype(boost::apply_visitor(std::forward< Args >(args)...))
 

Typedef Documentation

◆ array

using mstch::array = typedef std::vector<node>

◆ citer

using mstch::citer = typedef std::string::const_iterator

◆ criter

using mstch::criter = typedef std::string::const_reverse_iterator

◆ delim_type

using mstch::delim_type = typedef std::pair<std::string, std::string>

◆ lambda

◆ map

using mstch::map = typedef internal::map<const std::string, node>

◆ node

using mstch::node = typedef boost::make_recursive_variant< std::nullptr_t, std::string, int, double, bool, uint64_t, int64_t, uint32_t, internal::lambda_t<boost::recursive_variant_>, std::shared_ptr<internal::object_t<boost::recursive_variant_> >, internal::map<const std::string, boost::recursive_variant_>, std::vector<boost::recursive_variant_> >::type

◆ object

Function Documentation

◆ first_not_ws() [1/2]

mstch::citer mstch::first_not_ws ( mstch::citer  begin,
mstch::citer  end 
)

◆ first_not_ws() [2/2]

mstch::citer mstch::first_not_ws ( mstch::criter  begin,
mstch::criter  end 
)

◆ html_escape()

std::string mstch::html_escape ( const std::string &  str)

◆ render()

std::string mstch::render ( const std::string &  tmplt,
const node root,
const std::map< std::string, std::string > &  partials = std::map<std::string,std::string>() 
)

◆ reverse()

mstch::criter mstch::reverse ( mstch::citer  it)

◆ visit()

template<class... Args>
auto mstch::visit ( Args &&...  args) -> decltype(boost::apply_visitor( std::forward<Args>(args)...))