some more refactor

This commit is contained in:
Blue 2023-09-26 14:36:40 -03:00
parent cdaf94e3cd
commit d30e6ed759
Signed by: blue
GPG key ID: 9B203B252A63EE38
6 changed files with 111 additions and 32 deletions

View file

@ -2,9 +2,14 @@
#include <string>
#include <filesystem>
#include <fstream>
#include <memory>
#include <exception>
#include <optional>
#include <functional>
#include <array>
#include <string_view>
#include <nlohmann/json.hpp>
#include "loggable.h"
#include "loggger.h"
@ -42,11 +47,17 @@ public:
void read();
void build(const std::filesystem::path& destination, const std::string& target);
private:
void tryReadingBuildScenarios();
bool readAsMason();
bool errorScenario(const std::string& message);
private:
State state;
Type type;
std::shared_ptr<Collection> collection;
std::filesystem::path location;
std::optional<nlohmann::json> scenario;
};
class Component::WrongState : public std::runtime_error {