Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
Olympe::AtomicTaskUIRegistry Class Reference

Singleton registry mapping task IDs to TaskSpec metadata. More...

#include <AtomicTaskUIRegistry.h>

Public Member Functions

void Register (const TaskSpec &spec)
 Registers a TaskSpec for the given task ID.
 
const TaskSpecGetTaskSpec (const std::string &id) const
 Returns the TaskSpec for the given id, or nullptr if not found.
 
std::vector< std::string > GetAllTaskIds () const
 Returns all registered task IDs (unordered).
 
std::vector< TaskSpecGetTasksByCategory (const std::string &category) const
 Returns all tasks belonging to the given category.
 
std::vector< std::string > GetAllCategories () const
 Returns all unique category names.
 
std::vector< TaskSpecGetSortedForUI () const
 Returns all tasks sorted by category then displayName, suitable for building a dropdown or combo box.
 

Static Public Member Functions

static AtomicTaskUIRegistryGet ()
 Returns the singleton instance.
 

Private Member Functions

 AtomicTaskUIRegistry ()
 
void InitializeBuiltInTasks ()
 

Private Attributes

std::unordered_map< std::string, TaskSpecm_specs
 

Detailed Description

Singleton registry mapping task IDs to TaskSpec metadata.

Definition at line 54 of file AtomicTaskUIRegistry.h.

Constructor & Destructor Documentation

◆ AtomicTaskUIRegistry()

Olympe::AtomicTaskUIRegistry::AtomicTaskUIRegistry ( )
private

Definition at line 26 of file AtomicTaskUIRegistry.cpp.

References InitializeBuiltInTasks().

+ Here is the call graph for this function:

Member Function Documentation

◆ Get()

AtomicTaskUIRegistry & Olympe::AtomicTaskUIRegistry::Get ( )
static

Returns the singleton instance.

Calls InitializeBuiltInTasks() on first access.

Definition at line 20 of file AtomicTaskUIRegistry.cpp.

References GetComponentTypeID_Static().

Referenced by Olympe::VSGraphVerifier::CheckAtomicTaskIDs(), Olympe::NodeGraphPanel::HandleNodeInteractions(), Olympe::VisualScriptNodeRenderer::RenderNode(), and Olympe::VisualScriptEditorPanel::RenderNodePropertiesPanelContent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetAllCategories()

std::vector< std::string > Olympe::AtomicTaskUIRegistry::GetAllCategories ( ) const

Returns all unique category names.

Definition at line 75 of file AtomicTaskUIRegistry.cpp.

References GetComponentTypeID_Static(), and m_specs.

+ Here is the call graph for this function:

◆ GetAllTaskIds()

std::vector< std::string > Olympe::AtomicTaskUIRegistry::GetAllTaskIds ( ) const

Returns all registered task IDs (unordered).

Definition at line 51 of file AtomicTaskUIRegistry.cpp.

References GetComponentTypeID_Static(), and m_specs.

+ Here is the call graph for this function:

◆ GetSortedForUI()

std::vector< TaskSpec > Olympe::AtomicTaskUIRegistry::GetSortedForUI ( ) const

Returns all tasks sorted by category then displayName, suitable for building a dropdown or combo box.

Definition at line 93 of file AtomicTaskUIRegistry.cpp.

References GetComponentTypeID_Static(), and m_specs.

Referenced by Olympe::VisualScriptEditorPanel::RenderNodePropertiesPanelContent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTasksByCategory()

std::vector< TaskSpec > Olympe::AtomicTaskUIRegistry::GetTasksByCategory ( const std::string &  category) const

Returns all tasks belonging to the given category.

Parameters
categoryCategory string (e.g. "Movement").

Definition at line 60 of file AtomicTaskUIRegistry.cpp.

References GetComponentTypeID_Static(), and m_specs.

+ Here is the call graph for this function:

◆ GetTaskSpec()

const TaskSpec * Olympe::AtomicTaskUIRegistry::GetTaskSpec ( const std::string &  id) const

Returns the TaskSpec for the given id, or nullptr if not found.

Parameters
idTask ID string.

Definition at line 45 of file AtomicTaskUIRegistry.cpp.

References GetComponentTypeID_Static(), and m_specs.

Referenced by Olympe::NodeGraphPanel::HandleNodeInteractions(), Olympe::VisualScriptNodeRenderer::RenderNode(), and Olympe::VisualScriptEditorPanel::RenderNodePropertiesPanelContent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InitializeBuiltInTasks()

void Olympe::AtomicTaskUIRegistry::InitializeBuiltInTasks ( )
private

Definition at line 114 of file AtomicTaskUIRegistry.cpp.

References GetComponentTypeID_Static(), Olympe::TaskSpec::parameters, and Register().

Referenced by AtomicTaskUIRegistry().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Register()

void Olympe::AtomicTaskUIRegistry::Register ( const TaskSpec spec)

Registers a TaskSpec for the given task ID.

Parameters
specSpec to register (id must be non-empty).

Definition at line 35 of file AtomicTaskUIRegistry.cpp.

References GetComponentTypeID_Static(), and m_specs.

Referenced by InitializeBuiltInTasks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_specs

std::unordered_map<std::string, TaskSpec> Olympe::AtomicTaskUIRegistry::m_specs
private

The documentation for this class was generated from the following files: