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) | |
| 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 * | 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
IsSystemLike
- See Also
Definition at line 44 of file System.ixx.
Public Constructors
System()
| default |
Default constructor creating an empty System.
Definition at line 98 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 IsSystemLike<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 111 of file System.ixx.
System()
Definition at line 115 of file System.ixx.
System()
| noexcept default |
Definition at line 119 of file System.ixx.
Public Operators
operator=()
Definition at line 116 of file System.ixx.
operator=()
| default |
Definition at line 118 of file System.ixx.
Public Member Functions
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 143 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 151 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 130 of file System.ixx.
Reference helios::engine::runtime::registerComponents.
Private Member Attributes
pimpl_
|
Definition at line 91 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.