2021-10-10 20:26:30 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
#include <tuple>
|
2021-10-11 13:59:23 +00:00
|
|
|
|
2021-10-18 10:54:01 +00:00
|
|
|
#ifdef USE_SIMDJSON_JSON
|
|
|
|
# include "simdjson/simdjson.h"
|
|
|
|
#endif
|
|
|
|
|
2021-10-18 23:39:26 +00:00
|
|
|
#ifdef USE_RAPIDJSON_JSON
|
|
|
|
# include "rapidjson/rapidjson.h"
|
|
|
|
# include "rapidjson/document.h"
|
|
|
|
#endif
|
|
|
|
|
2021-10-11 13:59:23 +00:00
|
|
|
#ifdef USE_BOOST_JSON
|
|
|
|
# include <boost/json.hpp>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef USE_NLOHMANN_JSON
|
|
|
|
# include "nlohmann/json.hpp"
|
|
|
|
#endif
|
2021-10-10 20:26:30 +00:00
|
|
|
|
2021-10-11 18:13:05 +00:00
|
|
|
#ifdef USE_JSONCPP_JSON
|
|
|
|
# include <json/json.h>
|
|
|
|
#endif
|
|
|
|
|
2021-10-18 10:54:01 +00:00
|
|
|
#include "cycles_t.h"
|
2021-10-10 20:26:30 +00:00
|
|
|
#include "state_t.h"
|
|
|
|
|
2021-10-13 22:33:08 +00:00
|
|
|
class test_t final {
|
2021-10-10 20:26:30 +00:00
|
|
|
private:
|
|
|
|
std::string m_name;
|
|
|
|
state_t m_initial_state;
|
|
|
|
state_t m_final_state;
|
2021-10-18 10:54:01 +00:00
|
|
|
cycles_t m_cycles;
|
2021-10-11 13:59:23 +00:00
|
|
|
|
2021-10-18 10:54:01 +00:00
|
|
|
public:
|
2021-10-11 18:13:05 +00:00
|
|
|
|
2021-10-11 21:09:03 +00:00
|
|
|
#ifdef USE_SIMDJSON_JSON
|
2021-10-18 10:54:01 +00:00
|
|
|
test_t(simdjson::dom::element serialised);
|
2021-10-11 21:09:03 +00:00
|
|
|
#endif
|
|
|
|
|
2021-10-18 23:39:26 +00:00
|
|
|
#ifdef USE_RAPIDJSON_JSON
|
|
|
|
test_t(const rapidjson::Value& serialised);
|
|
|
|
#endif
|
|
|
|
|
2021-10-11 13:59:23 +00:00
|
|
|
#ifdef USE_BOOST_JSON
|
2021-10-10 20:26:30 +00:00
|
|
|
test_t(const boost::json::object& serialised);
|
|
|
|
test_t(const boost::json::value& serialised);
|
2021-10-11 13:59:23 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef USE_NLOHMANN_JSON
|
|
|
|
test_t(const nlohmann::json& serialised);
|
|
|
|
#endif
|
2021-10-10 20:26:30 +00:00
|
|
|
|
2021-10-11 18:13:05 +00:00
|
|
|
#ifdef USE_JSONCPP_JSON
|
|
|
|
test_t(const Json::Value& serialised);
|
|
|
|
#endif
|
|
|
|
|
2021-10-11 09:43:33 +00:00
|
|
|
[[nodiscard]] constexpr const auto& name() const noexcept { return m_name; }
|
|
|
|
[[nodiscard]] constexpr const auto& initial_state() const noexcept { return m_initial_state; }
|
|
|
|
[[nodiscard]] constexpr const auto& final_state() const noexcept { return m_final_state; }
|
|
|
|
[[nodiscard]] constexpr const auto& cycles() const noexcept { return m_cycles; }
|
2021-10-18 10:54:01 +00:00
|
|
|
};
|