![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Interface for atomic tasks in the Atomic Task System. More...
#include <string>#include <unordered_map>#include "TaskGraphTypes.h"#include "AtomicTaskContext.h"
Include dependency graph for IAtomicTask.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| class | Olympe::IAtomicTask |
| Abstract interface for a single atomic unit of work. More... | |
Namespaces | |
| namespace | Olympe |
| < Provides AssetID and INVALID_ASSET_ID | |
Enumerations | |
| enum class | Olympe::TaskStatus : uint8_t { Olympe::Success , Olympe::Failure , Olympe::Running } |
| Result code returned by IAtomicTask::Execute(). More... | |
Interface for atomic tasks in the Atomic Task System.
IAtomicTask is the base interface that every concrete atomic task must implement. An atomic task receives a parameter map (string -> TaskValue) at Execute() time and returns a TaskStatus indicating success, failure, or running (for multi-frame tasks). If the system needs to interrupt a running task it calls Abort() so the task can clean up any state.
ExecuteWithContext() is a non-breaking addition that provides richer runtime context (World*, LocalBlackboard*, EntityID, dt, StateTimer). The default implementation forwards to the legacy Execute(params) so existing tasks continue to work without any changes. New tasks may override ExecuteWithContext() instead of Execute() to access the context.
C++14 compliant - no C++17/20 features.
Definition in file IAtomicTask.h.