Unravel Engine C++ Reference
Loading...
Searching...
No Matches
project_manager.h
Go to the documentation of this file.
1#pragma once
2#include <context/context.hpp>
6#include <filesystem/syncer.h>
7#include <cmd_line/parser.h>
8
9
10namespace unravel
11{
13{
14public:
17
18 auto init(rtti::context& ctx, const cmd_line::parser& parser) -> bool;
19 auto deinit(rtti::context& ctx) -> bool;
20
21
22 auto open_project(rtti::context& ctx, const fs::path& project_path) -> bool;
23
25
26 void create_project(rtti::context& ctx, const fs::path& project_path);
27
29
31
32 auto get_name() const -> const std::string&;
33
34 void set_name(const std::string& name);
35
36 auto get_settings() -> settings&;
39
40
41 auto has_open_project() const -> bool;
42
47
48private:
49 void fixup_editor_settings_on_save();
50 void fixup_editor_settings_on_load();
51
52 void setup_directory(rtti::context& ctx, fs::syncer& syncer);
53 void setup_meta_syncer(rtti::context& ctx, fs::syncer& syncer, const fs::path& data_dir, const fs::path& meta_dir);
54 void setup_cache_syncer(rtti::context& ctx,
55 std::vector<uint64_t>& watchers,
56 fs::syncer& syncer,
57 const fs::path& meta_dir,
58 const fs::path& cache_dir);
59 std::shared_ptr<int> sentinel_ = std::make_shared<int>(0);
60
61
63 std::string project_name_;
64 settings project_settings_;
65 deploy_settings deploy_settings_;
66 editor_settings editor_settings_;
67
68 fs::syncer app_meta_syncer_;
69 fs::syncer app_cache_syncer_;
70 std::vector<std::uint64_t> app_watchers_;
71
72 fs::syncer editor_meta_syncer_;
73 fs::syncer editor_cache_syncer_;
74 std::vector<std::uint64_t> editor_watchers_;
75
76 fs::syncer engine_meta_syncer_;
77 fs::syncer engine_cache_syncer_;
78 std::vector<std::uint64_t> engine_watchers_;
79};
80} // namespace unravel
auto init(rtti::context &ctx, const cmd_line::parser &parser) -> bool
auto get_deploy_settings() -> deploy_settings &
project_manager(rtti::context &ctx, cmd_line::parser &parser)
void set_name(const std::string &name)
auto has_open_project() const -> bool
auto get_editor_settings() -> editor_settings &
auto open_project(rtti::context &ctx, const fs::path &project_path) -> bool
auto deinit(rtti::context &ctx) -> bool
void create_project(rtti::context &ctx, const fs::path &project_path)
auto get_settings() -> settings &
void save_project_settings(rtti::context &ctx)
auto get_name() const -> const std::string &
void close_project(rtti::context &ctx)
std::string name
Definition hub.cpp:27