From 8f0dda5eab181b0f14f2652b4e984aaaae3f258c Mon Sep 17 00:00:00 2001 From: rtk0c Date: Mon, 27 Jun 2022 18:27:13 -0700 Subject: Start from a clean slate --- core/src/Model/Project.hpp | 57 ---------------------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 core/src/Model/Project.hpp (limited to 'core/src/Model/Project.hpp') diff --git a/core/src/Model/Project.hpp b/core/src/Model/Project.hpp deleted file mode 100644 index 17d9acb..0000000 --- a/core/src/Model/Project.hpp +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include "Model/Assets.hpp" -#include "Model/Database.hpp" -#include "Model/Items.hpp" -#include "Model/Template/Template.hpp" -#include "Model/Workflow/Workflow.hpp" - -#include -#include -#include -#include -#include - -class Project -{ -private: - std::filesystem::path mRootPath; - std::string mRootPathString; - std::string mName; - - // (Exception to style guidelines) - // This is put after the private fields, so that when XxxDatabase's constructor runs, all of them will be initialized -public: - WorkflowAssetList Workflows; - TemplateAssetList Templates; - ItemList Products; - ItemList Factories; - ItemList Customers; - MainDatabase Database; - -public: - /// Load the project from a directory containing the cplt_project.json file. - /// This only loads the main project file, the caller needs to - Project(std::filesystem::path rootPath); - - /// Create a project with the given name in the given path. Note that the path should be a directory that will contain the project files once created. - /// This function assumes the given directory will exist and is empty. - Project(std::filesystem::path rootPath, std::string name); - - /// Path to a *directory* that contains the project file. - const std::filesystem::path& GetPath() const; - const std::string& GetPathString() const; - - std::filesystem::path GetDatabasesDirectory() const; - std::filesystem::path GetItemsDirectory() const; - std::filesystem::path GetWorkflowsDirectory() const; - std::filesystem::path GetWorkflowPath(std::string_view name) const; - std::filesystem::path GetTemplatesDirectory() const; - std::filesystem::path GetTemplatePath(std::string_view name) const; - - const std::string& GetName() const; - void SetName(std::string name); - - Json::Value Serialize(); - void WriteToDisk(); -}; -- cgit v1.2.3-70-g09d2