metaforce/Editor/ProjectManager.hpp

39 lines
865 B
C++
Raw Normal View History

2015-12-13 21:01:32 +00:00
#ifndef RUDE_PROJECT_MANAGER_HPP
#define RUDE_PROJECT_MANAGER_HPP
#include <HECL/Database.hpp>
2016-01-05 00:01:02 +00:00
#include <Athena/DNAYaml.hpp>
2015-12-13 21:01:32 +00:00
namespace RUDE
{
2016-01-04 05:31:02 +00:00
class ViewManager;
2015-12-13 21:01:32 +00:00
2016-01-05 00:01:02 +00:00
#ifdef RUDE_BINARY_CONFIGS
using ConfigReader = Athena::io::IStreamReader;
using ConfigWriter = Athena::io::IStreamWriter;
#else
using ConfigReader = Athena::io::YAMLDocReader;
using ConfigWriter = Athena::io::YAMLDocWriter;
#endif
2015-12-13 21:01:32 +00:00
class ProjectManager
{
2016-01-04 05:31:02 +00:00
ViewManager& m_vm;
std::unique_ptr<HECL::Database::Project> m_proj;
static bool m_registeredSpecs;
2015-12-13 21:01:32 +00:00
public:
2016-01-04 05:31:02 +00:00
ProjectManager(ViewManager& vm);
operator bool() const {return m_proj.operator bool();}
bool newProject(const HECL::SystemString& path);
bool openProject(const HECL::SystemString& path);
bool extractGame(const HECL::SystemString& path);
2015-12-13 21:01:32 +00:00
2016-01-05 00:01:02 +00:00
bool saveProject();
2015-12-13 21:01:32 +00:00
};
}
#endif // RUDE_PROJECT_MANAGER_HPP