![]() |
Ember
|
Manages BehaviorTree projects. More...
#include <ProjectManager.h>
Public Member Functions | |
| ProjectManager (const ProjectManager &)=delete | |
| ProjectManager & | operator= (const ProjectManager &)=delete |
| std::shared_ptr< BehaviorTreeProject > | CreateProject (const String &name, const String &description="") |
| bool | OpenProject (const String &filepath) |
| bool | SaveProject () |
| bool | SaveProjectAs (const String &filepath) |
| bool | CloseProject () |
| std::shared_ptr< BehaviorTreeProject > | GetActiveProject () const |
| bool | HasActiveProject () const |
| String | GetActiveProjectPath () const |
| bool | IsProjectModified () const |
| void | SetProjectModified (bool modified) |
| const std::vector< String > & | GetRecentProjects () const |
| void | AddToRecentProjects (const String &filepath) |
| void | RemoveFromRecentProjects (const String &filepath) |
| void | ClearRecentProjects () |
| bool | RecentProjectExists (const String &filepath) const |
| String | GetProjectsDirectory () const |
| bool | EnsureProjectsDirectoryExists () |
| void | ResetToDefaults () |
| bool | LoadConfig () |
| bool | SaveConfig () |
Static Public Member Functions | |
| static ProjectManager & | GetInstance () |
Static Public Attributes | |
| static const size_t | MAX_RECENT_PROJECTS = 10 |
Private Member Functions | |
| ProjectManager () | |
| ~ProjectManager ()=default | |
| void | AddToRecentProjectsInternal (const String &filepath) |
| void | RemoveFromRecentProjectsInternal (const String &filepath) |
Private Attributes | |
| std::mutex | mutex_ |
| std::shared_ptr< BehaviorTreeProject > | active_project_ |
| String | active_project_path_ |
| bool | project_modified_ |
| std::vector< String > | recent_projects_ |
| String | projects_directory_ |
| String | config_file_ |
Manages BehaviorTree projects.
This singleton class handles loading, saving, and managing BehaviorTree projects. It tracks the active project and maintains a list of recently opened projects.
Definition at line 17 of file ProjectManager.h.
|
delete |
|
private |
Definition at line 18 of file ProjectManager.cpp.
|
privatedefault |
| void EmberCore::ProjectManager::AddToRecentProjects | ( | const String & | filepath | ) |
Definition at line 212 of file ProjectManager.cpp.
|
private |
Definition at line 218 of file ProjectManager.cpp.
| void EmberCore::ProjectManager::ClearRecentProjects | ( | ) |
Definition at line 244 of file ProjectManager.cpp.
| bool EmberCore::ProjectManager::CloseProject | ( | ) |
Definition at line 164 of file ProjectManager.cpp.
| std::shared_ptr< BehaviorTreeProject > EmberCore::ProjectManager::CreateProject | ( | const String & | name, |
| const String & | description = "" ) |
Definition at line 72 of file ProjectManager.cpp.
| bool EmberCore::ProjectManager::EnsureProjectsDirectoryExists | ( | ) |
Definition at line 48 of file ProjectManager.cpp.
| std::shared_ptr< BehaviorTreeProject > EmberCore::ProjectManager::GetActiveProject | ( | ) | const |
Definition at line 181 of file ProjectManager.cpp.
| String EmberCore::ProjectManager::GetActiveProjectPath | ( | ) | const |
Definition at line 191 of file ProjectManager.cpp.
|
static |
Definition at line 13 of file ProjectManager.cpp.
|
inline |
Definition at line 55 of file ProjectManager.h.
| const std::vector< String > & EmberCore::ProjectManager::GetRecentProjects | ( | ) | const |
Definition at line 206 of file ProjectManager.cpp.
| bool EmberCore::ProjectManager::HasActiveProject | ( | ) | const |
Definition at line 186 of file ProjectManager.cpp.
| bool EmberCore::ProjectManager::IsProjectModified | ( | ) | const |
Definition at line 196 of file ProjectManager.cpp.
| bool EmberCore::ProjectManager::LoadConfig | ( | ) |
Definition at line 268 of file ProjectManager.cpp.
| bool EmberCore::ProjectManager::OpenProject | ( | const String & | filepath | ) |
Definition at line 81 of file ProjectManager.cpp.
|
delete |
| bool EmberCore::ProjectManager::RecentProjectExists | ( | const String & | filepath | ) | const |
Definition at line 250 of file ProjectManager.cpp.
| void EmberCore::ProjectManager::RemoveFromRecentProjects | ( | const String & | filepath | ) |
Definition at line 231 of file ProjectManager.cpp.
|
private |
Definition at line 237 of file ProjectManager.cpp.
| void EmberCore::ProjectManager::ResetToDefaults | ( | ) |
Definition at line 255 of file ProjectManager.cpp.
| bool EmberCore::ProjectManager::SaveConfig | ( | ) |
Definition at line 305 of file ProjectManager.cpp.
| bool EmberCore::ProjectManager::SaveProject | ( | ) |
Definition at line 117 of file ProjectManager.cpp.
| bool EmberCore::ProjectManager::SaveProjectAs | ( | const String & | filepath | ) |
Definition at line 140 of file ProjectManager.cpp.
| void EmberCore::ProjectManager::SetProjectModified | ( | bool | modified | ) |
Definition at line 201 of file ProjectManager.cpp.
|
private |
Definition at line 77 of file ProjectManager.h.
|
private |
Definition at line 78 of file ProjectManager.h.
|
private |
Definition at line 83 of file ProjectManager.h.
|
static |
Definition at line 20 of file ProjectManager.h.
|
mutableprivate |
Definition at line 74 of file ProjectManager.h.
|
private |
Definition at line 79 of file ProjectManager.h.
|
private |
Definition at line 82 of file ProjectManager.h.
|
private |
Definition at line 81 of file ProjectManager.h.