CAPIO-CL 1.2.0
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_CL";
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 commit rule is not a vlid 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 is not a vlid CAPIO-CL rule");
63 }
64}
65} // namespace commitRules
66
68struct CAPIO_CL_VERSION final {
70 static constexpr char V1[] = "1.0";
72 static constexpr char V1_1[] = "1.1";
73};
74
75namespace serializer {
76class Serializer;
77class SerializerException;
78} // namespace serializer
79
80namespace monitor {
81class Monitor;
82class MonitorException;
83} // namespace monitor
84
85namespace engine {
86class Engine;
87}
88
89namespace configuration {
92struct defaults;
93} // namespace configuration
94} // namespace capiocl
95
96#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:26
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:10
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:10
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:68
static constexpr char V1_1[]
Release 1.1 of CAPIO-CL.
Definition capiocl.hpp:72
static constexpr char V1[]
Release 1.0 of CAPIO-CL.
Definition capiocl.hpp:70
Defaults values keys for runtime options of CAPIO-CL.
Definition configuration.h:17