38 lines
952 B
C++
38 lines
952 B
C++
#pragma once
|
|
#include <filesystem>
|
|
#include <iostream>
|
|
#include "../../YoggieEngine/src/YoggieEngine.h"
|
|
#include <yaml-cpp/yaml.h>
|
|
|
|
|
|
class Project {
|
|
public:
|
|
Project() = default;
|
|
Project(const std::string& name): Name(name){}
|
|
~Project() { spdlog::info("Unloading project {0}...", Name);}
|
|
|
|
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; }
|
|
|
|
|
|
void AddScene(YoggieEngine::Scene& scene)
|
|
{
|
|
Scenes.push_back(&scene);
|
|
}
|
|
|
|
static void SaveProject(std::filesystem::path path, Project& project);
|
|
static void LoadProject(std::filesystem::path path, Project& project);
|
|
private:
|
|
std::string Name;
|
|
std::filesystem::path ProjectDirectory;
|
|
|
|
std::vector<YoggieEngine::Scene*> Scenes;
|
|
|
|
friend class YAML::convert<Project>;
|
|
|
|
};
|
|
|