MQTTSuite
Loading...
Searching...
No Matches
inja.hpp File Reference
#include <nlohmann/json.hpp>
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <memory>
#include <sstream>
#include <string>
#include <string_view>
#include <functional>
#include <map>
#include <vector>
#include <utility>
#include <algorithm>
#include <stdexcept>
#include <limits>
#include <stack>
#include <cctype>
#include <locale>
#include <numeric>
Include dependency graph for inja.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  inja::FunctionStorage
 Class for builtin functions and user-defined callbacks. More...
struct  inja::FunctionStorage::FunctionData
struct  inja::SourceLocation
struct  inja::InjaError
struct  inja::ParserError
struct  inja::RenderError
struct  inja::FileError
struct  inja::DataError
class  inja::NodeVisitor
class  inja::AstNode
 Base node class for the abstract syntax tree (AST). More...
class  inja::BlockNode
class  inja::TextNode
class  inja::ExpressionNode
class  inja::LiteralNode
class  inja::DataNode
class  inja::FunctionNode
class  inja::ExpressionListNode
class  inja::StatementNode
class  inja::ForStatementNode
class  inja::ForArrayStatementNode
class  inja::ForObjectStatementNode
class  inja::IfStatementNode
class  inja::IncludeStatementNode
class  inja::ExtendsStatementNode
class  inja::BlockStatementNode
class  inja::SetStatementNode
class  inja::StatisticsVisitor
 A class for counting statistics on a Template. More...
struct  inja::Template
 The main inja Template. More...
struct  inja::LexerConfig
 Class for lexer configuration. More...
struct  inja::ParserConfig
 Class for parser configuration. More...
struct  inja::RenderConfig
 Class for render configuration. More...
struct  inja::Token
 Helper-class for the inja Lexer. More...
class  inja::Lexer
 Class for lexing an inja Template. More...
class  inja::Parser
 Class for parsing an inja Template. More...
class  inja::Renderer
 Class for rendering a Template with data. More...
class  inja::Environment
 Class for changing the configuration. More...

Namespaces

namespace  inja
namespace  inja::string_view

Macros

#define INJA_THROW(exception)
#define INJA_NOEXCEPTION
#define INCLUDE_INJA_ENVIRONMENT_HPP_
#define INCLUDE_INJA_CONFIG_HPP_
#define INCLUDE_INJA_TEMPLATE_HPP_
#define INCLUDE_INJA_NODE_HPP_
#define INCLUDE_INJA_FUNCTION_STORAGE_HPP_
#define INCLUDE_INJA_UTILS_HPP_
#define INCLUDE_INJA_EXCEPTIONS_HPP_
#define INCLUDE_INJA_STATISTICS_HPP_
#define INCLUDE_INJA_PARSER_HPP_
#define INCLUDE_INJA_LEXER_HPP_
#define INCLUDE_INJA_TOKEN_HPP_
#define INCLUDE_INJA_RENDERER_HPP_

Typedefs

using inja::CallbackFunction = std::function<json(Arguments& args)>
using inja::VoidCallbackFunction = std::function<void(Arguments& args)>
using inja::TemplateStorage = std::map<std::string, Template>

Functions

std::string_view inja::string_view::slice (std::string_view view, size_t start, size_t end)
std::pair< std::string_view, std::string_view > inja::string_view::split (std::string_view view, char Separator)
bool inja::string_view::starts_with (std::string_view view, std::string_view prefix)
SourceLocation inja::get_source_location (std::string_view content, size_t pos)
void inja::replace_substring (std::string &s, const std::string &f, const std::string &t)
std::string inja::render (std::string_view input, const json &data)
 render with default settings to a string
void inja::render_to (std::ostream &os, std::string_view input, const json &data)
 render with default settings to the given output stream

Macro Definition Documentation

◆ INCLUDE_INJA_CONFIG_HPP_

#define INCLUDE_INJA_CONFIG_HPP_

Definition at line 67 of file inja.hpp.

◆ INCLUDE_INJA_ENVIRONMENT_HPP_

#define INCLUDE_INJA_ENVIRONMENT_HPP_

Definition at line 56 of file inja.hpp.

◆ INCLUDE_INJA_EXCEPTIONS_HPP_

#define INCLUDE_INJA_EXCEPTIONS_HPP_

Definition at line 243 of file inja.hpp.

◆ INCLUDE_INJA_FUNCTION_STORAGE_HPP_

#define INCLUDE_INJA_FUNCTION_STORAGE_HPP_

Definition at line 91 of file inja.hpp.

◆ INCLUDE_INJA_LEXER_HPP_

#define INCLUDE_INJA_LEXER_HPP_

Definition at line 1005 of file inja.hpp.

◆ INCLUDE_INJA_NODE_HPP_

#define INCLUDE_INJA_NODE_HPP_

Definition at line 83 of file inja.hpp.

◆ INCLUDE_INJA_PARSER_HPP_

#define INCLUDE_INJA_PARSER_HPP_

Definition at line 989 of file inja.hpp.

◆ INCLUDE_INJA_RENDERER_HPP_

#define INCLUDE_INJA_RENDERER_HPP_

Definition at line 2182 of file inja.hpp.

◆ INCLUDE_INJA_STATISTICS_HPP_

#define INCLUDE_INJA_STATISTICS_HPP_

Definition at line 798 of file inja.hpp.

◆ INCLUDE_INJA_TEMPLATE_HPP_

#define INCLUDE_INJA_TEMPLATE_HPP_

Definition at line 74 of file inja.hpp.

◆ INCLUDE_INJA_TOKEN_HPP_

#define INCLUDE_INJA_TOKEN_HPP_

Definition at line 1014 of file inja.hpp.

◆ INCLUDE_INJA_UTILS_HPP_

#define INCLUDE_INJA_UTILS_HPP_

Definition at line 233 of file inja.hpp.

◆ INJA_NOEXCEPTION

#define INJA_NOEXCEPTION

Definition at line 50 of file inja.hpp.

◆ INJA_THROW

#define INJA_THROW ( exception)
Value:
std::abort(); \
std::ignore = exception

Definition at line 45 of file inja.hpp.

45#define INJA_THROW(exception) \
46 std::abort(); \
47 std::ignore = exception