Horizon
pool_info.hpp
1 #pragma once
2 #include <string>
3 #include "util/uuid.hpp"
4 #include "nlohmann/json_fwd.hpp"
5 #include <vector>
6 #include "util/file_version.hpp"
7 
8 namespace horizon {
9 using json = nlohmann::json;
10 
11 class PoolInfo {
12 public:
13  static const UUID project_pool_uuid;
14  PoolInfo(const std::string &bp);
15  PoolInfo();
16  PoolInfo(const json &j);
17  std::string base_path;
18  UUID uuid;
19  UUID default_via;
20  std::string name;
21  std::vector<UUID> pools_included;
22  void save() const;
23  bool is_project_pool() const;
24  bool is_usable() const;
25  static unsigned int get_app_version();
26  FileVersion version;
27 
28 private:
29  PoolInfo(const json &j, const std::string &bp);
30 };
31 } // namespace horizon
Definition: file_version.hpp:9
Definition: pool_info.hpp:11
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16
a class to store JSON values
Definition: json.hpp:177
basic_json<> json
default JSON class
Definition: json_fwd.hpp:62