2023-04-15 21:23:12 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <filesystem>
|
|
|
|
#include <iostream>
|
|
|
|
#include <fstream>
|
|
|
|
#include <deque>
|
|
|
|
#include <string>
|
|
|
|
#include "projects/project.hpp"
|
|
|
|
|
|
|
|
class ProjectList {
|
|
|
|
public:
|
|
|
|
ProjectList();
|
|
|
|
|
|
|
|
const std::deque<Project>& GetProjects();
|
|
|
|
void AddProject(Project&&);
|
2023-06-11 06:39:34 +00:00
|
|
|
void RemoveProjectByName(const std::string& name);
|
2023-04-15 21:23:12 +00:00
|
|
|
|
|
|
|
const Project& GetProject(
|
|
|
|
const std::filesystem::path& path = std::filesystem::current_path()) const;
|
|
|
|
void LoadFromYaml(const std::string& file_path);
|
|
|
|
void SaveToYaml(const std::string& file_path) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::deque<Project> projects_;
|
|
|
|
};
|