yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
project_manager.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_SYSTEM_PROJECT_MANAGER_H_
2#define YAZE_APP_EDITOR_SYSTEM_PROJECT_MANAGER_H_
3
4#include <string>
5
6#include "absl/status/status.h"
7#include "core/project.h"
8
9namespace yaze {
10namespace editor {
11
12class ToastManager;
13
25 public:
26 explicit ProjectManager(ToastManager* toast_manager);
27 ~ProjectManager() = default;
28
29 // Project file operations
30 absl::Status CreateNewProject(const std::string& template_name = "");
31 absl::Status OpenProject(const std::string& filename = "");
32 absl::Status SaveProject();
33 absl::Status SaveProjectAs(const std::string& filename = "");
34
35 // Project import/export
36 absl::Status ImportProject(const std::string& project_path);
37 absl::Status ExportProject(const std::string& export_path);
38
39 // Project maintenance
40 absl::Status RepairCurrentProject();
41 absl::Status ValidateProject();
42
43 // Project information
46 bool HasActiveProject() const { return !current_project_.filepath.empty(); }
47 std::string GetProjectName() const;
48 std::string GetProjectPath() const;
49
50 // Project templates
51 std::vector<std::string> GetAvailableTemplates() const;
52 absl::Status CreateFromTemplate(const std::string& template_name,
53 const std::string& project_name);
54
55 private:
58
59 // Helper methods
60 absl::Status LoadProjectFromFile(const std::string& filename);
61 absl::Status SaveProjectToFile(const std::string& filename);
62 std::string GenerateProjectFilename(const std::string& project_name) const;
63 bool IsValidProjectFile(const std::string& filename) const;
64 absl::Status InitializeProjectStructure(const std::string& project_path);
65};
66
67} // namespace editor
68} // namespace yaze
69
70#endif // YAZE_APP_EDITOR_SYSTEM_PROJECT_MANAGER_H_
Handles all project file operations.
std::string GenerateProjectFilename(const std::string &project_name) const
absl::Status SaveProjectAs(const std::string &filename="")
absl::Status ExportProject(const std::string &export_path)
std::vector< std::string > GetAvailableTemplates() const
std::string GetProjectPath() const
bool IsValidProjectFile(const std::string &filename) const
const project::YazeProject & GetCurrentProject() const
absl::Status CreateNewProject(const std::string &template_name="")
project::YazeProject current_project_
absl::Status OpenProject(const std::string &filename="")
absl::Status ImportProject(const std::string &project_path)
absl::Status LoadProjectFromFile(const std::string &filename)
absl::Status InitializeProjectStructure(const std::string &project_path)
absl::Status CreateFromTemplate(const std::string &template_name, const std::string &project_name)
project::YazeProject & GetCurrentProject()
absl::Status SaveProjectToFile(const std::string &filename)
std::string GetProjectName() const
Main namespace for the application.
Definition controller.cc:20
Modern project structure with comprehensive settings consolidation.
Definition project.h:78