Skip to main content

Model Class Template

Typed wrapper that adapts a concrete system to the Concept interface. More...

Declaration

template <typename T> class helios::engine::runtime::world::System::Model<T> { ... }

Base class

classhelios::engine::runtime::world::System::Concept

Public Constructors Index

template <typename T>
Model (T sys, void *buffer=nullptr)

Public Member Functions Index

template <typename T>
voidupdate (UpdateContext &ctx) noexcept override
template <typename T>
void *underlying () noexcept override
template <typename T>
const void *underlying () const noexcept override

Private Member Attributes Index

template <typename T>
Tsystem_
template <typename T>
void *injectedBuffer_ {nullptr}

Description

Typed wrapper that adapts a concrete system to the Concept interface.

Template Parameters
T

The concrete system type, must satisfy IsSystemLike<T>.

Definition at line 65 of file System.ixx.

Public Constructors

Model()

template <typename T>
helios::engine::runtime::world::System::Model< T >::Model (T sys, void * buffer=nullptr)
inline explicit

Definition at line 70 of file System.ixx.

70 explicit Model(T sys, void* buffer = nullptr)
71 : system_(std::move(sys)), injectedBuffer_(buffer) {}

Public Member Functions

underlying()

template <typename T>
void * helios::engine::runtime::world::System::Model< T >::underlying ()
inline noexcept

Definition at line 82 of file System.ixx.

82 void* underlying() noexcept override {
83 return &system_;
84 }

underlying()

template <typename T>
const void * helios::engine::runtime::world::System::Model< T >::underlying ()
inline noexcept

Definition at line 86 of file System.ixx.

86 const void* underlying() const noexcept override {
87 return &system_;
88 }

update()

template <typename T>
void helios::engine::runtime::world::System::Model< T >::update (UpdateContext & ctx)
inline noexcept

Definition at line 73 of file System.ixx.

73 void update(UpdateContext& ctx) noexcept override {
74 if constexpr (requires { typename T::CommandBuffer_type; }) {
75 using BufT = typename T::CommandBuffer_type;
76 system_.update(ctx, *static_cast<BufT*>(injectedBuffer_));
77 } else {
78 system_.update(ctx);
79 }
80 }

Private Member Attributes

injectedBuffer_

template <typename T>
void* helios::engine::runtime::world::System::Model< T >::injectedBuffer_ {nullptr}

Definition at line 67 of file System.ixx.

67 void* injectedBuffer_{nullptr};

system_

template <typename T>
T helios::engine::runtime::world::System::Model< T >::system_

Definition at line 66 of file System.ixx.

66 T system_;

The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.