![]() |
Project
|
Mixin component is used with different data types. More...
#include <runtime_container.h>
Inherits BASE.
Classes | |
class | member_apply_at |
Public Types | |
typedef T | wrapped_type |
each stage of the mixin class wraps one type | |
typedef rc_mixin< BASE, wrapped_type > | mixin_type |
this is the self type | |
typedef boost::mpl::push_back< typenameBASE::types, mixin_type >::type | types |
a vector of all mixin stage types so far | |
typedef boost::mpl::plus< typenameBASE::level, boost::mpl::int_< 1 > >::type | level |
increment the level counter | |
Public Member Functions | |
rc_mixin () | |
void | print () |
constexpr std::size_t | size () const |
get size at this stage | |
void | set (wrapped_type v) |
set member wrapped object | |
wrapped_type | get () const |
get wrapped object | |
wrapped_type & | operator* () |
get wrapped object reference | |
wrapped_type & | operator= (const wrapped_type &v) |
assignment operator to wrapped type | |
operator wrapped_type () const | |
type conversion to wrapped type | |
wrapped_type & | operator+= (const wrapped_type &v) |
operator | |
wrapped_type | operator+ (const wrapped_type &v) |
operator | |
template<typename F , bool unroll = false> | |
F::return_type | apply (int index, F f) |
Mixin component is used with different data types.
the mixin class
Each mixin component has a member of the specified type. The container level exports the following data types to the outside:
Definition at line 400 of file runtime_container.h.
typedef boost::mpl::plus<typenameBASE::level,boost::mpl::int_<1>>::type gNeric::rc_mixin< BASE, T >::level |
increment the level counter
Definition at line 412 of file runtime_container.h.
typedef rc_mixin<BASE, wrapped_type> gNeric::rc_mixin< BASE, T >::mixin_type |
this is the self type
Definition at line 408 of file runtime_container.h.
typedef boost::mpl::push_back<typenameBASE::types,mixin_type>::type gNeric::rc_mixin< BASE, T >::types |
a vector of all mixin stage types so far
Definition at line 410 of file runtime_container.h.
typedef T gNeric::rc_mixin< BASE, T >::wrapped_type |
each stage of the mixin class wraps one type
Definition at line 406 of file runtime_container.h.
|
inline |
Definition at line 403 of file runtime_container.h.
|
inline |
apply functor to the runtime object at index TODO: there is a performance issue with this solution, introducing another level of functors makes the access much slower compared with applying to container instance and using container member functions, tested with the add_value functor and bench_runtime_container, also the actual operation needs to be checked, the result is not correct for the last check of 100000000 iterations
Definition at line 485 of file runtime_container.h.
|
inline |
get wrapped object
Definition at line 426 of file runtime_container.h.
|
inline |
type conversion to wrapped type
Definition at line 432 of file runtime_container.h.
|
inline |
get wrapped object reference
Definition at line 428 of file runtime_container.h.
|
inline |
operator
Definition at line 436 of file runtime_container.h.
|
inline |
operator
Definition at line 434 of file runtime_container.h.
|
inline |
assignment operator to wrapped type
Definition at line 430 of file runtime_container.h.
|
inline |
Definition at line 413 of file runtime_container.h.
|
inline |
set member wrapped object
Definition at line 424 of file runtime_container.h.
|
inlineconstexpr |
get size at this stage
Definition at line 422 of file runtime_container.h.