Project
Loading...
Searching...
No Matches
gNeric::rc_dispatcher< _ContainerT, F, Position, _IndexT > Struct Template Reference

#include <runtime_container.h>

Public Types

typedef _ContainerT::types types
 
typedef boost::mpl::if_< boost::mpl::less< Position, boost::mpl::size< types > >, rc_apply< _ContainerT, typenameboost::mpl::at< types, Position >::type, _IndexT, F >, rc_apply_at< _ContainerT, _IndexT, typenameboost::mpl::begin< types >::type, typenameboost::mpl::end< types >::type, 0, F > >::type type
 

Static Public Member Functions

static F::return_type apply (_ContainerT &c, _IndexT position, F &f)
 

Detailed Description

template<typename _ContainerT, typename F, typename Position = boost::mpl::size<typename _ContainerT::types>, typename _IndexT = int>
struct gNeric::rc_dispatcher< _ContainerT, F, Position, _IndexT >

Generalized dispatcher with the ability for code unrolling

The optional template parameter 'Position' can be used to cast directly to the specified level in the runtime container and apply the functor without the recursive loop. The template call with default parameters forwards to the recursive call because 'Position' is set to out of list range.

Definition at line 333 of file runtime_container.h.

Member Typedef Documentation

◆ type

template<typename _ContainerT , typename F , typename Position = boost::mpl::size<typename _ContainerT::types>, typename _IndexT = int>
typedef boost::mpl::if_<boost::mpl::less<Position,boost::mpl::size<types>>,rc_apply<_ContainerT,typenameboost::mpl::at<types,Position>::type,_IndexT,F>,rc_apply_at<_ContainerT,_IndexT,typenameboost::mpl::begin<types>::type,typenameboost::mpl::end<types>::type,0,F>>::type gNeric::rc_dispatcher< _ContainerT, F, Position, _IndexT >::type

Definition at line 346 of file runtime_container.h.

◆ types

template<typename _ContainerT , typename F , typename Position = boost::mpl::size<typename _ContainerT::types>, typename _IndexT = int>
typedef _ContainerT::types gNeric::rc_dispatcher< _ContainerT, F, Position, _IndexT >::types

Definition at line 334 of file runtime_container.h.

Member Function Documentation

◆ apply()

template<typename _ContainerT , typename F , typename Position = boost::mpl::size<typename _ContainerT::types>, typename _IndexT = int>
static F::return_type gNeric::rc_dispatcher< _ContainerT, F, Position, _IndexT >::apply ( _ContainerT &  c,
_IndexT  position,
F &  f 
)
inlinestatic

Definition at line 348 of file runtime_container.h.


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