Crossfire Server, Trunk
|
Class for changing the configuration. More...
#include <inja.hpp>
Public Member Functions | |
void | add_callback (const std::string &name, const CallbackFunction &callback) |
Adds a variadic callback. More... | |
void | add_callback (const std::string &name, int num_args, const CallbackFunction &callback) |
Adds a callback with given number or arguments. More... | |
void | add_void_callback (const std::string &name, const VoidCallbackFunction &callback) |
Adds a variadic void callback. More... | |
void | add_void_callback (const std::string &name, int num_args, const VoidCallbackFunction &callback) |
Adds a void callback with given number or arguments. More... | |
Environment () | |
Environment (const std::string &global_path) | |
Environment (const std::string &input_path, const std::string &output_path) | |
void | include_template (const std::string &name, const Template &tmpl) |
std::string | load_file (const std::string &filename) |
json | load_json (const std::string &filename) |
Template | parse (nonstd::string_view input) |
Template | parse_file (const std::string &filename) |
Template | parse_template (const std::string &filename) |
std::string | render (const Template &tmpl, const json &data) |
std::string | render (nonstd::string_view input, const json &data) |
std::string | render_file (const std::string &filename, const json &data) |
std::string | render_file_with_json_file (const std::string &filename, const std::string &filename_data) |
std::ostream & | render_to (std::ostream &os, const Template &tmpl, const json &data) |
void | set_comment (const std::string &open, const std::string &close) |
Sets the opener and closer for template comments. More... | |
void | set_expression (const std::string &open, const std::string &close) |
Sets the opener and closer for template expressions. More... | |
void | set_line_statement (const std::string &open) |
Sets the opener for template line statements. More... | |
void | set_lstrip_blocks (bool lstrip_blocks) |
Sets whether to strip the spaces and tabs from the start of a line to a block. More... | |
void | set_search_included_templates_in_files (bool search_in_files) |
Sets the element notation syntax. More... | |
void | set_statement (const std::string &open, const std::string &close) |
Sets the opener and closer for template statements. More... | |
void | set_throw_at_missing_includes (bool will_throw) |
Sets whether a missing include will throw an error. More... | |
void | set_trim_blocks (bool trim_blocks) |
Sets whether to remove the first newline after a block. More... | |
void | write (const std::string &filename, const json &data, const std::string &filename_out) |
void | write (const Template &temp, const json &data, const std::string &filename_out) |
void | write_with_json_file (const std::string &filename, const std::string &filename_data, const std::string &filename_out) |
void | write_with_json_file (const Template &temp, const std::string &filename_data, const std::string &filename_out) |
Private Attributes | |
FunctionStorage | function_storage |
std::string | input_path |
LexerConfig | lexer_config |
std::string | output_path |
ParserConfig | parser_config |
RenderConfig | render_config |
TemplateStorage | template_storage |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
Adds a callback with given number or arguments.
Definition at line 4393 of file inja.hpp.
References inja::FunctionStorage::add_callback(), and give::name.
|
inline |
|
inline |
Adds a void callback with given number or arguments.
Definition at line 4400 of file inja.hpp.
References inja::FunctionStorage::add_callback(), make_face_from_files::args, and give::name.
|
inline |
Includes a template with a given name into the environment. Then, a template can be rendered in another template using the include "<name>" syntax.
Definition at line 4408 of file inja.hpp.
References give::name.
|
inline |
Definition at line 4363 of file inja.hpp.
References npc_dialog::filename, and make_face_from_files::parser.
|
inline |
Definition at line 4368 of file inja.hpp.
References mad_mage_user::file, npc_dialog::filename, and inja::open_file_or_throw().
|
inline |
Definition at line 4302 of file inja.hpp.
References make_face_from_files::parser.
|
inline |
Definition at line 4314 of file inja.hpp.
References npc_dialog::filename.
|
inline |
Definition at line 4307 of file inja.hpp.
References npc_dialog::filename, make_face_from_files::parser, and rotate-tower::result.
Definition at line 4320 of file inja.hpp.
References navar-midane_time::data, and inja::render_to().
|
inline |
Definition at line 4318 of file inja.hpp.
References navar-midane_time::data, and render().
Referenced by render(), and inja::render().
|
inline |
Definition at line 4326 of file inja.hpp.
References navar-midane_time::data, npc_dialog::filename, and inja::render().
|
inline |
Definition at line 4330 of file inja.hpp.
References navar-midane_time::data, and npc_dialog::filename.
|
inline |
Definition at line 4358 of file inja.hpp.
References navar-midane_time::data, and inja::Renderer::render_to().
|
inline |
Sets the opener and closer for template comments.
Definition at line 4274 of file inja.hpp.
References CFBank::open().
|
inline |
Sets the opener and closer for template expressions.
Definition at line 4265 of file inja.hpp.
References CFBank::open().
|
inline |
Sets the opener for template line statements.
Definition at line 4259 of file inja.hpp.
References CFBank::open().
|
inline |
|
inline |
|
inline |
Sets the opener and closer for template statements.
Definition at line 4249 of file inja.hpp.
References CFBank::open().
|
inline |
|
inline |
|
inline |
Definition at line 4335 of file inja.hpp.
References navar-midane_time::data, mad_mage_user::file, and npc_dialog::filename.
|
inline |
Definition at line 4341 of file inja.hpp.
References navar-midane_time::data, mad_mage_user::file, inja::render(), and guildbuy::temp.
|
inline |
Definition at line 4347 of file inja.hpp.
References navar-midane_time::data, and npc_dialog::filename.
|
inline |
Definition at line 4353 of file inja.hpp.
References navar-midane_time::data, and guildbuy::temp.
|
private |
|
private |