OpenLB 1.7
|
Factory for instances of a specific Dynamics type. More...
#include <blockDynamicsMap.h>
Public Member Functions | |
template<typename DYNAMICS > | |
DynamicsPromise (meta::id< DYNAMICS > id=meta::id< DYNAMICS >{}) | |
std::type_index | id () const |
Returns type index of the promised DYNAMICS. | |
Dynamics< T, DESCRIPTOR > * | realize () |
Returns new instance of the promised DYNAMICS. | |
template<Platform PLATFORM> | |
BlockCollisionO< T, DESCRIPTOR, PLATFORM > * | realize () |
Returns new instance of the collision operator for promised DYNAMICS. | |
Protected Attributes | |
std::type_index | _id |
std::function< Dynamics< T, DESCRIPTOR > *()> | _dynamicsConstructor |
std::function< AbstractCollisionO< T, DESCRIPTOR > *(Platform)> | _operatorConstructor |
Factory for instances of a specific Dynamics type.
Factory callables for DYNAMICS and ConcreteBlockCollisionO<DYNAMICS> are constructed at DynamicsPromise construction time. Recipients accepting such promised dynamics are not obligated to actually realize this promise.
This structure is needed to bridge the gap between high level virtual interfaces and efficient platform-specific implementations with full type knowledge. i.e. DynamicsPromise can carry full dynamics type information through the virtual layer surrounding concrete platform-specialized block lattices (needed as virtual template methods are not supported by C++).
Definition at line 278 of file blockDynamicsMap.h.
|
inline |
Definition at line 286 of file blockDynamicsMap.h.
|
inline |
Returns type index of the promised DYNAMICS.
Definition at line 314 of file blockDynamicsMap.h.
References olb::DynamicsPromise< T, DESCRIPTOR >::_id.
|
inline |
Returns new instance of the promised DYNAMICS.
Definition at line 319 of file blockDynamicsMap.h.
References olb::DynamicsPromise< T, DESCRIPTOR >::_dynamicsConstructor.
|
inline |
Returns new instance of the collision operator for promised DYNAMICS.
Definition at line 325 of file blockDynamicsMap.h.
References olb::DynamicsPromise< T, DESCRIPTOR >::_operatorConstructor.
|
protected |
Definition at line 281 of file blockDynamicsMap.h.
|
protected |
Definition at line 280 of file blockDynamicsMap.h.
|
protected |
Definition at line 282 of file blockDynamicsMap.h.