Loading Projects now

This commit is contained in:
2022-11-05 13:47:37 +01:00
parent 3b91516d6e
commit 7343300dcb
3 changed files with 53 additions and 15 deletions

View File

@ -1,13 +1,22 @@
#pragma once
#include <filesystem>
#include <iostream>
class Project {
public:
Project() = default;
Project(const std::string& name): Name(name){}
~Project() { std::cout << "Unloading project..." << Name << std::endl; }
void setName(std::string& name) { Name = name; }
const std::string& GetName()const { return Name; }
void setProjectDirectory(std::string& path) { ProjectDirectory = std::filesystem::path(path); }
const std::filesystem::path GetProjectDirectory() { return ProjectDirectory; }
static void SaveProject(std::filesystem::path path, Project& project);
static void LoadProject(std::filesystem::path path, Project& project);
static void LoadProject(std::filesystem::path path, std::shared_ptr<Project>& project);
private:
std::string Name;
std::filesystem::path ProjectDirectory;
};