Struct instance for handling evaluation of database access rules.
More...
#include <expr_evaluator.h>
|
| ExprEvaluator ()=default |
|
auto | evaluate (const std::string &expr, const TokenMap &vars) -> bool |
| Evaluates a given expression in a context of the given TokenMap variables.
|
|
auto | evaluate (const std::string &expr, const json &vars) -> bool |
| Evaluates a given expression in a context of the given JSON object variables.
|
|
auto | jsonToTokenMap (const json &j) -> TokenMap |
| Convert a given JSON Object to the equivalent TokenMap so that we can pass it to the evaluator.
|
|
Struct instance for handling evaluation of database access rules.
◆ ExprEvaluator()
mantis::ExprEvaluator::ExprEvaluator |
( |
| ) |
|
|
default |
◆ evaluate() [1/2]
bool mantis::ExprEvaluator::evaluate |
( |
const std::string & |
expr, |
|
|
const json & |
vars |
|
) |
| -> bool |
Evaluates a given expression in a context of the given JSON object variables.
- Parameters
-
expr | Access rule expression. |
vars | Parameter variables as JSON. |
- Returns
- True or False
◆ evaluate() [2/2]
bool mantis::ExprEvaluator::evaluate |
( |
const std::string & |
expr, |
|
|
const TokenMap & |
vars |
|
) |
| -> bool |
Evaluates a given expression in a context of the given TokenMap variables.
- Parameters
-
expr | Access rule expression |
vars | Parameter tokens |
- Returns
- True or False
◆ jsonToTokenMap()
TokenMap mantis::ExprEvaluator::jsonToTokenMap |
( |
const json & |
j | ) |
-> TokenMap |
Convert a given JSON Object to the equivalent TokenMap so that we can pass it to the evaluator.
- Parameters
-
- Returns
- TokenMap equivalent of the JSON Object
◆ __class_name__
const std::string mantis::ExprEvaluator::__class_name__ = "mantis::ExprEvaluator" |
The documentation for this struct was generated from the following files: