Olympe Engine
2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Source
TaskSystem
AtomicTasks
System
Task_GetWorldInstance.h
Go to the documentation of this file.
1
/**
2
* @file Task_GetWorldInstance.h
3
* @brief Atomic task that resolves a named World entity and stores its ID.
4
* @author Olympe Engine
5
* @date 2026-03-08
6
*
7
* @details
8
* Task_GetWorldInstance looks up an entity by name in the live World and
9
* stores the resulting EntityID under "local:TargetInstance" in the
10
* LocalBlackboard. When ctx.WorldPtr is null (headless / test mode) the
11
* task logs a warning and returns Failure.
12
*
13
* Parameters (ParameterMap):
14
* "InstanceName" (String) — name of the entity to locate (required).
15
*
16
* Returns:
17
* Success if the entity was found (EntityID written to LocalBB).
18
* Failure if InstanceName is missing, WorldPtr is null, or entity not found.
19
*
20
* C++14 compliant - no C++17/20 features.
21
*/
22
23
#pragma once
24
25
#include "../../IAtomicTask.h"
26
27
namespace
Olympe
{
28
29
/**
30
* @class Task_GetWorldInstance
31
* @brief Finds an entity by name in World and stores its EntityID in LocalBB.
32
*/
33
class
Task_GetWorldInstance
:
public
IAtomicTask
{
34
public
:
35
Task_GetWorldInstance
();
36
37
TaskStatus
ExecuteWithContext
(
const
AtomicTaskContext
&
ctx
,
38
const
ParameterMap
&
params
)
override
;
39
40
TaskStatus
Execute
(
const
ParameterMap
&
params
)
override
;
41
42
void
Abort
()
override
;
43
};
44
45
}
// namespace Olympe
GetComponentTypeID_Static
ComponentTypeID GetComponentTypeID_Static()
Definition
ECS_Entity.h:56
Olympe::IAtomicTask
Abstract interface for a single atomic unit of work.
Definition
IAtomicTask.h:63
Olympe::IAtomicTask::ParameterMap
std::unordered_map< std::string, TaskValue > ParameterMap
Convenience alias for the parameter map passed to Execute().
Definition
IAtomicTask.h:67
Olympe::Task_GetWorldInstance
Finds an entity by name in World and stores its EntityID in LocalBB.
Definition
Task_GetWorldInstance.h:33
Olympe::Task_GetWorldInstance::Execute
TaskStatus Execute(const ParameterMap ¶ms) override
Executes the atomic task for one frame.
Definition
Task_GetWorldInstance.cpp:30
Olympe::Task_GetWorldInstance::Task_GetWorldInstance
Task_GetWorldInstance()
Definition
Task_GetWorldInstance.cpp:23
Olympe::Task_GetWorldInstance::ExecuteWithContext
TaskStatus ExecuteWithContext(const AtomicTaskContext &ctx, const ParameterMap ¶ms) override
Executes the atomic task for one frame with full runtime context.
Definition
Task_GetWorldInstance.cpp:35
Olympe::Task_GetWorldInstance::Abort
void Abort() override
Aborts the task, releasing any in-progress state.
Definition
Task_GetWorldInstance.cpp:25
Olympe
< Provides AssetID and INVALID_ASSET_ID
Definition
BTEditorCommand.cpp:16
Olympe::TaskStatus
TaskStatus
Result code returned by IAtomicTask::Execute().
Definition
IAtomicTask.h:38
Olympe::AtomicTaskContext
Lightweight context bundle passed to IAtomicTask::ExecuteWithContext().
Definition
AtomicTaskContext.h:36
Generated on Mon Apr 13 2026 08:15:20 for Olympe Engine by
1.9.8