CAPIO-CL 1.3.4
CAPIO-CL: Cross Application Programmable I/O - Coordination Language
Loading...
Searching...
No Matches
/home/runner/work/CAPIO-CL/CAPIO-CL/capiocl.hpp
1#ifndef CAPIO_CL_CAPIOCL_HPP
2#define CAPIO_CL_CAPIOCL_HPP
3
4#include <jsoncons/basic_json.hpp>
5#include <string>
6
8namespace capiocl {
9
11constexpr char CAPIO_CL_DEFAULT_WF_NAME[] = "CAPIO";
12
14namespace fireRules {
16constexpr char NO_UPDATE[] = "no_update";
18constexpr char UPDATE[] = "update";
19
25inline std::string sanitize(const std::string &input) {
26 if (input == NO_UPDATE) {
27 return NO_UPDATE;
28 } else if (input == UPDATE) {
29 return UPDATE;
30 } else {
31 throw std::invalid_argument("Input fire rule: " + input + " is not a valid CAPIO-CL rule");
32 }
33}
34} // namespace fireRules
35
37namespace commitRules {
39constexpr char ON_CLOSE[] = "on_close";
41constexpr char ON_FILE[] = "on_file";
43constexpr char ON_N_FILES[] = "on_n_files";
45constexpr char ON_TERMINATION[] = "on_termination";
46
52inline std::string sanitize(const std::string &input) {
53 if (input == ON_CLOSE) {
54 return ON_CLOSE;
55 } else if (input == ON_FILE) {
56 return ON_FILE;
57 } else if (input == ON_N_FILES) {
58 return ON_N_FILES;
59 } else if (input == ON_TERMINATION) {
60 return ON_TERMINATION;
61 } else {
62 throw std::invalid_argument("Input commit rule: " + input +
63 " is not a valid CAPIO-CL rule");
64 }
65}
66} // namespace commitRules
67
69struct CAPIO_CL_VERSION final {
71 static constexpr char V1[] = "1.0";
73 static constexpr char V1_1[] = "1.1";
74};
75
76namespace serializer {
77class Serializer;
78class SerializerException;
79} // namespace serializer
80
81namespace monitor {
82class Monitor;
83class MonitorException;
84} // namespace monitor
85
86namespace engine {
87class Engine;
88}
89
90namespace configuration {
93struct defaults;
94} // namespace configuration
95
96namespace webapi {
98}
99
100} // namespace capiocl
101
102#endif // CAPIO_CL_CAPIOCL_HPP
Custom exception thrown when handling a CAPIO-CL TOML configuration file.
Definition configuration.h:77
Load configuration and store it from a CAPIO-CL TOML configuration file.
Definition configuration.h:31
Engine for managing CAPIO-CL configuration entries. The CapioCLEngine class stores and manages config...
Definition engine.h:27
Class that exposes a REST Web Server to interact with the current configuration.
Definition webapi.h:8
Namespace containing the CAPIO-CL Commit Rules.
Definition capiocl.hpp:37
constexpr char ON_FILE[]
CoF Streaming Rule.
Definition capiocl.hpp:41
constexpr char ON_TERMINATION[]
CoT Streaming Rule.
Definition capiocl.hpp:45
constexpr char ON_CLOSE[]
CoC Streaming Rule.
Definition capiocl.hpp:39
std::string sanitize(const std::string &input)
Definition capiocl.hpp:52
constexpr char ON_N_FILES[]
CnF Streaming Rule.
Definition capiocl.hpp:43
Namespace containing the CAPIO-CL Engine.
Definition engine.h:11
Namespace containing the CAPIO-CL Firing Rules.
Definition capiocl.hpp:14
constexpr char UPDATE[]
FoC Streaming Rule.
Definition capiocl.hpp:18
constexpr char NO_UPDATE[]
FnU Streaming Rule.
Definition capiocl.hpp:16
std::string sanitize(const std::string &input)
Definition capiocl.hpp:25
Namespace containing the CAPIO-CL Serializer component.
Definition serializer.h:7
Namespace containing all the CAPIO-CL related code.
Definition engine.h:11
constexpr char CAPIO_CL_DEFAULT_WF_NAME[]
Default workflow name for CAPIO-CL.
Definition capiocl.hpp:11
Available versions of CAPIO-CL language.
Definition capiocl.hpp:69
static constexpr char V1_1[]
Release 1.1 of CAPIO-CL.
Definition capiocl.hpp:73
static constexpr char V1[]
Release 1.0 of CAPIO-CL.
Definition capiocl.hpp:71
Defaults values keys for runtime options of CAPIO-CL.
Definition configuration.h:17