Class responsible for managing editor projects. Handles project creation, loading, saving, and scene serialization within a project directory.
More...
#include <ProjectManager.hpp>
|
| | ~ProjectManager () |
| | Destructor.
|
| void | createProject (const std::string &name, std::shared_ptr< Engine::Scene > &scene) |
| | Creates a new project with the specified name and initializes its scene.
|
| void | loadProject (const std::filesystem::path &path, std::shared_ptr< Engine::Scene > &scene) |
| | Loads a project and all resources contained within it.
|
| void | SetLastProject (const std::string &name) |
| | Stores the name of the last opened project.
|
| void | clearLastProject () |
| | Clears the stored last project information.
|
| void | saveProject (std::shared_ptr< Engine::Scene > &scenes) |
| | Saves the current project and all associated scenes.
|
| void | saveScene (const Engine::Scene &scene, const std::filesystem::path &scenePath) |
| | Saves a specific scene to a file.
|
| void | SetProjectPath (const std::filesystem::path &path) |
| | Sets the current project path.
|
| void | SetLoadedProjectName (const std::string &name) |
| | Sets the name of the loaded project.
|
| const std::filesystem::path & | GetProjectPath () const |
| | Returns the current project path.
|
| std::string | GetLoadedProjectName () const |
| | Returns the name of the currently loaded project.
|
|
| void | loadScene (const std::filesystem::path &path, std::shared_ptr< Engine::Scene > &scene) |
| | Loads a scene from a file path and populates the provided scene object.
|
Class responsible for managing editor projects. Handles project creation, loading, saving, and scene serialization within a project directory.
◆ ~ProjectManager()
| Editor::ProjectManager::~ProjectManager |
( |
| ) |
|
◆ clearLastProject()
| void Editor::ProjectManager::clearLastProject |
( |
| ) |
|
Clears the stored last project information.
◆ createProject()
| void Editor::ProjectManager::createProject |
( |
const std::string & | name, |
|
|
std::shared_ptr< Engine::Scene > & | scene ) |
Creates a new project with the specified name and initializes its scene.
- Parameters
-
| name | Name of the project |
| scene | Scene associated with the new project |
◆ Get()
◆ GetLoadedProjectName()
| std::string Editor::ProjectManager::GetLoadedProjectName |
( |
| ) |
const |
|
inline |
Returns the name of the currently loaded project.
- Returns
- Project name
◆ GetProjectPath()
| const std::filesystem::path & Editor::ProjectManager::GetProjectPath |
( |
| ) |
const |
Returns the current project path.
- Returns
- Path to the loaded project
◆ loadProject()
| void Editor::ProjectManager::loadProject |
( |
const std::filesystem::path & | path, |
|
|
std::shared_ptr< Engine::Scene > & | scene ) |
Loads a project and all resources contained within it.
- Parameters
-
| path | Path to the project directory |
| scene | Scene that will receive the loaded data |
◆ loadScene()
| void Editor::ProjectManager::loadScene |
( |
const std::filesystem::path & | path, |
|
|
std::shared_ptr< Engine::Scene > & | scene ) |
|
protected |
Loads a scene from a file path and populates the provided scene object.
- Parameters
-
| path | Path to the scene file |
| scene | Scene instance to load data into |
◆ saveProject()
| void Editor::ProjectManager::saveProject |
( |
std::shared_ptr< Engine::Scene > & | scenes | ) |
|
Saves the current project and all associated scenes.
- Parameters
-
◆ saveScene()
| void Editor::ProjectManager::saveScene |
( |
const Engine::Scene & | scene, |
|
|
const std::filesystem::path & | scenePath ) |
Saves a specific scene to a file.
- Parameters
-
| scene | Scene to serialize |
| scenePath | Destination file path |
◆ SetLastProject()
| void Editor::ProjectManager::SetLastProject |
( |
const std::string & | name | ) |
|
Stores the name of the last opened project.
- Parameters
-
◆ SetLoadedProjectName()
| void Editor::ProjectManager::SetLoadedProjectName |
( |
const std::string & | name | ) |
|
|
inline |
Sets the name of the loaded project.
- Parameters
-
◆ SetProjectPath()
| void Editor::ProjectManager::SetProjectPath |
( |
const std::filesystem::path & | path | ) |
|
|
inline |
Sets the current project path.
- Parameters
-
| path | Project directory path |
◆ currentProjectPath
| std::filesystem::path Editor::ProjectManager::currentProjectPath |
|
protected |
Path to the currently opened project.
The documentation for this class was generated from the following file: