InternalBuffer Class Template
Per-command-type buffer that applies mutations on flush. More...
Declaration
Public Member Typedefs Index
template <typename TCommandType> | |
| using | EngineRoleTag = CommandBufferRole |
|
Role tag identifying this as a command buffer in the engine registry. More... | |
template <typename TCommandType> | |
| using | Command_type = TCommandType |
|
The command type stored in this buffer. More... | |
template <typename TCommandType> | |
| using | Component_type = typename TCommandType::Component_type |
|
Component type targeted by the buffered commands. More... | |
Public Constructors Index
template <typename TCommandType> | |
| InternalBuffer (TEntityManager &entityManager) | |
|
Reserves default capacity for the command vector. More... | |
Public Member Functions Index
template <typename TCommandType> | |
| void | flush (UpdateContext &updateContext) |
|
Applies all buffered add/remove-component commands directly via the entity manager. More... | |
template <typename TCommandType> | |
| void | clear () |
|
Discards all buffered commands without applying them. More... | |
template <typename TCommandType> | |
| void | init (CommandHandlerRegistry &commandHandlerRegistry, ManagerRegistry &managerRegistry) |
|
No-op; satisfies the buffer initialisation interface. More... | |
template <typename TCommandType> | |
| void | add (TCommandType commandType) |
|
Stores a command for deferred execution. More... | |
Private Member Attributes Index
template <typename TCommandType> | |
| CommandHandlerRegistry * | commandHandlerRegistry_ {nullptr} |
template <typename TCommandType> | |
| std::vector< TCommandType > | commands_ |
template <typename TCommandType> | |
| TEntityManager & | entityManager_ |
Description
Per-command-type buffer that applies mutations on flush.
Two flush() overloads exist, selected by concept constraints: one for component add/remove, one for entity activation/deactivation.
- Template Parameters
-
TCommandType ECS command type stored in this buffer.
Definition at line 108 of file EntityMutationManager.ixx.
Public Member Typedefs
Command_type
|
The command type stored in this buffer.
Definition at line 121 of file EntityMutationManager.ixx.
Component_type
|
Component type targeted by the buffered commands.
Definition at line 124 of file EntityMutationManager.ixx.
EngineRoleTag
|
Role tag identifying this as a command buffer in the engine registry.
Definition at line 118 of file EntityMutationManager.ixx.
Public Constructors
InternalBuffer()
| inline |
Reserves default capacity for the command vector.
Definition at line 127 of file EntityMutationManager.ixx.
Public Member Functions
add()
| inline |
Stores a command for deferred execution.
- Parameters
-
commandType Command instance to buffer.
Definition at line 173 of file EntityMutationManager.ixx.
clear()
| inline |
Discards all buffered commands without applying them.
Definition at line 161 of file EntityMutationManager.ixx.
flush()
| inline |
Applies all buffered add/remove-component commands directly via the entity manager.
Invalid entity handles are silently skipped.
- Parameters
-
updateContext Frame-local ECS context (currently unused; kept for interface uniformity).
Definition at line 138 of file EntityMutationManager.ixx.
init()
| inline |
No-op; satisfies the buffer initialisation interface.
Definition at line 166 of file EntityMutationManager.ixx.
Private Member Attributes
commandHandlerRegistry_
|
Definition at line 110 of file EntityMutationManager.ixx.
commands_
|
Definition at line 112 of file EntityMutationManager.ixx.
entityManager_
|
Definition at line 114 of file EntityMutationManager.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.