25 lines
529 B
C++
25 lines
529 B
C++
|
#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&&);
|
||
|
|
||
|
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_;
|
||
|
};
|