Class for builtin functions and user-defined callbacks. More...
#include <inja.hpp>
Classes | |
| struct | FunctionData |
Public Types | |
| enum class | Operation { Not , And , Or , In , Equal , NotEqual , Greater , GreaterEqual , Less , LessEqual , Add , Subtract , Multiplication , Division , Power , Modulo , AtId , At , Default , DivisibleBy , Even , Exists , ExistsInObject , First , Float , Int , IsArray , IsBoolean , IsFloat , IsInteger , IsNumber , IsObject , IsString , Last , Length , Lower , Max , Min , Odd , Range , Round , Sort , Upper , Super , Join , Callback , None } |
Public Member Functions | |
| void | add_builtin (std::string_view name, int num_args, Operation op) |
| void | add_callback (std::string_view name, int num_args, const CallbackFunction &callback) |
| FunctionData | find_function (std::string_view name, int num_args) const |
Private Attributes | |
| const int | VARIADIC {-1} |
| std::map< std::pair< std::string, int >, FunctionData > | function_storage |
|
strong |
Definition at line 107 of file inja.hpp.
|
inline |
Definition at line 202 of file inja.hpp.
References function_storage.
|
inline |
Definition at line 206 of file inja.hpp.
References Callback, and function_storage.
|
inline |
Definition at line 210 of file inja.hpp.
References function_storage, None, and VARIADIC.
Referenced by inja::Parser::parse_expression(), and inja::Renderer::visit().
|
private |
Definition at line 169 of file inja.hpp.
Referenced by add_builtin(), add_callback(), and find_function().
|
private |