Fishnet 2.0.1
Framework for Graph-Based Analysis of GIS Vector Data
Loading...
Searching...
No Matches
TaskConfig.hpp
Go to the documentation of this file.
1#pragma once
2#include <nlohmann/json.hpp>
3#include <concepts>
4
5using json = nlohmann::json;
6
12 constexpr static const char * WORKING_DIRECTORY_KEY = "working-directory";
14 std::filesystem::path workingDirectory;
15
16 TaskConfig(json configDescription):jsonDescription(std::move(configDescription)){
17 if(this->jsonDescription.contains(WORKING_DIRECTORY_KEY)){
18 this->jsonDescription.at(WORKING_DIRECTORY_KEY).get_to(this->workingDirectory);
19 }
20
21 }
22
23 TaskConfig()=default;
24};
nlohmann::json json
Definition TaskConfig.hpp:5
STL namespace.
Common super class for all task configurations. Stores the json used for configuration.
Definition TaskConfig.hpp:11
json jsonDescription
Definition TaskConfig.hpp:13
std::filesystem::path workingDirectory
Definition TaskConfig.hpp:14
TaskConfig()=default
static constexpr const char * WORKING_DIRECTORY_KEY
Definition TaskConfig.hpp:12
TaskConfig(json configDescription)
Definition TaskConfig.hpp:16