#include <vector>
#include <rapidjson/document.h>
#include "json_utils.hpp"
#include "utils.hpp"
Go to the source code of this file.
Possible outcomes of a dependent action
Enumerator |
---|
SUCCESS |
|
FAILURE |
|
SKIPPED |
|
bool check_depends |
( |
const rapidjson::Value & |
depends_json, |
|
|
std::vector< DependsOutcome > & |
outcomes, |
|
|
JsonRes & |
json_res |
|
) |
| |
|
noexcept |
Checks the dependency status of an action
- Parameters
-
[in] | depends_json | (possibly) dependent action |
[in] | outcomes | the current stack of previously obtained outcomes |
[in] | json_res | the response body, as JSON |
- Returns
true
if the dependency chain is holding, false
if broken
template<typename Hdl >
void handle_depends |
( |
const rapidjson::Value & |
json_req, |
|
|
JsonRes & |
json_res, |
|
|
Hdl && |
hdl |
|
) |
| |
Calls an action handler on all actions which dependency chain is holding
- Template Parameters
-
- Parameters
-
[in] | json_req | the JSON array of actions to be performed |
[in] | json_res | the response body, as JSON |
[in] | hdl | the action handler; callable of signature DependsOutcome(const rapidjson::Value&) |