System Class
Type-erased wrapper for game logic processors. More...
Declaration
Public Constructors Index
| System ()=default | |
template <typename T> | |
| System (T &&system, void *buffer=nullptr) | |
template <typename T, typename TCommandBuffer> | |
| System (T &&system, TCommandBuffer &&commandBuffer) | |
|
Wraps a concrete system in a type-erased System that also owns a CommandBuffer. More... | |
| System (const System &)=delete | |
| System (System &&) noexcept=default | |
Public Operators Index
| System & | operator= (const System &)=delete |
| System & | operator= (System &&)=default |
Public Member Functions Index
| void | update (UpdateContext &updateContext) noexcept |
| void | flush (UpdateContext &updateContext) noexcept |
|
Flushes any outstanding changes, e.g. commands of the associated buffer. More... | |
| void | init (GameWorld &gameWorld) noexcept |
| void * | underlying () noexcept |
|
Returns a type-erased pointer to the wrapped system instance. More... | |
| const void * | underlying () const noexcept |
|
Returns a type-erased pointer to the wrapped system instance. More... | |
Private Member Attributes Index
| std::unique_ptr< Concept > | pimpl_ |
Description
Type-erased wrapper for game logic processors.
System uses the Concept/Model pattern to erase the concrete system type. Concrete systems are plain classes that satisfy IsSystemLike<T> and do not inherit from System.
The internal Concept base defines the virtual update interface, and Model<T> adapts the concrete type T, owning it by value.
If a system exposes CommandBuffer_type, System calls update(UpdateContext&, CommandBuffer_type&) and uses the injected buffer pointer supplied by the creator (typically via Pass registration).
System is move-only (non-copyable).
- See Also
- See Also
Definition at line 51 of file System.ixx.
Public Constructors
System()
| default |
Default constructor creating an empty System.
Definition at line 150 of file System.ixx.
System()
| inline explicit |
Wraps a concrete system in a type-erased System.
- Template Parameters
-
T The concrete system type, must satisfy IsRuntimeSystemLike<T>.
- Parameters
-
system The concrete system instance to wrap (moved into internal storage).
buffer Optional pointer to the concrete T::CommandBuffer_type instance used for systems with two-parameter update signatures.
Definition at line 163 of file System.ixx.
System()
| inline explicit |
Wraps a concrete system in a type-erased System that also owns a CommandBuffer.
- Template Parameters
-
T The concrete system type, must satisfy IsRuntimeSystemLike<T>.
TCommandBuffer The concrete CommandBuffer-type, must satisfy IsCommandBufferLike<TCommandBuffer>.
- Parameters
-
system The concrete system instance to wrap (moved into internal storage).
commandBuffer The concrete command buffer instance to wrap (moved into internal storage).
Definition at line 179 of file System.ixx.
System()
Definition at line 192 of file System.ixx.
System()
| noexcept default |
Definition at line 196 of file System.ixx.
Public Operators
operator=()
Definition at line 193 of file System.ixx.
operator=()
| default |
Definition at line 195 of file System.ixx.
Public Member Functions
flush()
| inline noexcept |
Flushes any outstanding changes, e.g. commands of the associated buffer.
- Parameters
-
updateContext The current frame's update context.
Definition at line 215 of file System.ixx.
Reference helios::engine::runtime::registerComponents.
init()
| inline noexcept |
Inits this system with the owning GameWorld.
- Parameters
-
gameWorld The owning GameWorld.
Definition at line 225 of file System.ixx.
Reference helios::engine::runtime::registerComponents.
underlying()
| inline noexcept |
Returns a type-erased pointer to the wrapped system instance.
- Returns
Pointer to the underlying concrete system.
- Precondition
System must be initialized (pimpl_ != nullptr).
Definition at line 237 of file System.ixx.
Reference helios::engine::runtime::registerComponents.
underlying()
| inline noexcept |
Returns a type-erased pointer to the wrapped system instance.
- Returns
Pointer to the underlying concrete system.
- Precondition
System must be initialized (pimpl_ != nullptr).
Definition at line 245 of file System.ixx.
Reference helios::engine::runtime::registerComponents.
update()
| inline noexcept |
Delegates to the wrapped system's update() method.
- Parameters
-
updateContext The current frame's update context.
- Precondition
System must be initialized (pimpl_ != nullptr).
Definition at line 205 of file System.ixx.
Reference helios::engine::runtime::registerComponents.
Private Member Attributes
pimpl_
|
Definition at line 143 of file System.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.