Horizon
Loading...
Searching...
No Matches
project_pool.hpp
1#pragma once
2#include "pool.hpp"
3#include "nlohmann/json_fwd.hpp"
4
5namespace horizon {
6using json = nlohmann::json;
7class ProjectPool : public Pool {
8public:
9 ProjectPool(const std::string &base, bool cache);
10 std::string get_filename(ObjectType type, const UUID &uu, UUID *pool_uuid_out) override;
11 std::string get_model_filename(const UUID &pkg_uuid, const UUID &model_uuid) override;
12
13 static void create_directories(const std::string &base_path);
14 static std::map<UUID, std::string> patch_package(json &j, const UUID &pool_uuid);
15
16private:
17 const bool is_caching;
18 void update_model_filename(const UUID &pkg_uuid, const UUID &model_uuid, const std::string &new_filename);
19};
20} // namespace horizon
Stores objects (Unit, Entity, Symbol, Part, etc.) from the pool.
Definition pool.hpp:22
Definition project_pool.hpp:7
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