aboutsummaryrefslogtreecommitdiff
path: root/core/src/Model/Project.hpp
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2021-06-05 19:44:54 -0700
committerrtk0c <[email protected]>2021-06-05 19:44:54 -0700
commita180e1b56025c6b7d81d2e587ad90531d29de44c (patch)
tree1c88361320371b508c81b52a28ae0579fcdd1fd7 /core/src/Model/Project.hpp
parentd3fa128d5408673b0ea8d3ba3435c38b258a5e7a (diff)
Initial work on asset system (does not compile)
Diffstat (limited to 'core/src/Model/Project.hpp')
-rw-r--r--core/src/Model/Project.hpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/core/src/Model/Project.hpp b/core/src/Model/Project.hpp
index c971445..fea148d 100644
--- a/core/src/Model/Project.hpp
+++ b/core/src/Model/Project.hpp
@@ -1,5 +1,6 @@
#pragma once
+#include "Model/Assets.hpp"
#include "Model/Database.hpp"
#include "Model/Items.hpp"
#include "Model/Template/Template.hpp"
@@ -14,13 +15,13 @@
class Project
{
public:
+ TypedAssetList<Workflow> Workflows;
+ TypedAssetList<Template> Templates;
ItemList<ProductItem> Products;
ItemList<FactoryItem> Factories;
ItemList<CustomerItem> Customers;
private:
- tsl::array_map<char, WorkflowInfo> mWorkflows;
- tsl::array_map<char, TemplateInfo> mTemplates;
std::filesystem::path mRootPath;
std::string mRootPathString;
std::string mName;
@@ -51,18 +52,6 @@ public:
const std::string& GetName() const;
void SetName(std::string name);
- const tsl::array_map<char, WorkflowInfo>& GetWorkflows() const;
- std::unique_ptr<Workflow> LoadWorkflow(std::string_view name);
- std::unique_ptr<Workflow> CreateWorkflow(std::string_view name);
- bool RemoveWorkflow(std::string_view name);
- bool RenameWorkflow(std::string_view oldName, std::string_view newName);
-
- const tsl::array_map<char, TemplateInfo>& GetTemplates() const;
- std::unique_ptr<Template> LoadTemplate(std::string_view name);
- TemplateInfo* InsertTemplate(std::string_view name, TemplateInfo info);
- bool RemoveTemplate(std::string_view name);
- bool RenameTemplate(std::string_view oldName, std::string_view newName);
-
Json::Value Serialize();
void WriteToDisk();
};