lightweight_tuple¶
-
template<typename ...
Types>
classtim::lightweight_tuple: public tim::stack_bundle<mpl::available_t<type_list<Types...>>>, public tim::concepts::comp_wrapper¶ This is a variadic component wrapper which provides the least amount of runtime and compilation overhead.
- tparam Types
Specification of the component types to bundle together
Public Functions
-
this_type &
push()¶ generic push into storage
-
this_type &
pop()¶ generic pop out of storage
-
template<typename ...
Tp, typename ...Args>
this_type &start(mpl::piecewise_select<Tp...>, Args&&...)¶ selective start
-
template<typename ...
Tp, typename ...Args>
this_type &start(mpl::piecewise_ignore<Tp...>, Args&&...)¶ selective start
-
template<typename ...
Tp, typename ...Args>
this_type &stop(mpl::piecewise_select<Tp...>, Args&&...)¶ selective stop
-
template<typename ...
Tp, typename ...Args>
this_type &stop(mpl::piecewise_ignore<Tp...>, Args&&...)¶ selection stop
-
data_type &
data()¶ get tuple
-
const data_type &
data() const¶ get tuple
-
template<typename
FuncT, typename ...Args>
inline decltype(auto)execute(FuncT &&func, Args&&... args)¶ when chaining together operations, this function enables executing a function inside the chain
-
template<typename ...
Args>
inline this_type &construct(Args&&... _args)¶ construct the objects that have constructors with matching arguments
-
inline this_type &
assemble()¶ provide preliminary info to the objects with matching arguments. This is typically used to notify a component that it has been bundled alongside another component that it can extract data from.
-
inline this_type &
derive()¶ provide conclusive info to the objects with matching arguments. This is typically used by components to extract data from another component it has been bundled alongside, e.g. the cpu_util component can extract data from tim::component::wall_clock and tim::component::cpu_clock
-
template<typename ...
Args>
inline this_type &mark_begin(Args&&... _args)¶ mark a beginning position in the execution (typically used by asynchronous structures)
-
template<typename ...
Args>
inline this_type &mark_end(Args&&... _args)¶ mark a beginning position in the execution (typically used by asynchronous structures)
-
template<typename ...
Args>
inline this_type &audit(Args&&... _args)¶ allow the components to inspect the incoming arguments before start or out-going return value before returning (typically using in GOTCHA components)
-
template<typename ...
Args>
inline this_type &add_secondary(Args&&... _args)¶ perform an add_secondary operation. This operation allows components to add additional entries to storage which are their direct descendant
-
template<typename ...
Args>
inline this_type &update_statistics(Args&&... _args)¶ perform an add_secondary operation. This operation allows components to add additional entries to storage which are their direct descendant
-
template<template<typename> class
OpT, typename ...Args>
inline this_type &invoke(Args&&... _args)¶ apply a user-defined operation to all the components
- Template Parameters
OpT – Operation struct
-
template<template<typename> class
OpT, typename ...Tp, typename ...Args>
inline this_type &invoke(mpl::piecewise_select<Tp...>, Args&&... _args)¶ generic member function for invoking user-provided operations on a specific set of component types
- Template Parameters
OpT – Operation struct
-
template<template<typename> class
OpT, typename ...Tp, typename ...Args>
inline this_type &invoke(mpl::piecewise_ignore<Tp...>, Args&&... _args)¶ generic member function for invoking user-provided operations on a specific set of component types
- Template Parameters
OpT – Operation struct
-
template<typename
T, enable_if_t<is_one_of<T, data_type>::value, int> = 0>
inline T *get()¶ get member functions taking either a type
-
template<typename
T, typenameFuncT>
decltype(auto)get(FuncT &&_func)¶ get member functions finding component and applying lambda
-
template<typename
U, typenameT= std::remove_pointer_t<decay_t<U>>, enable_if_t<trait::is_available<T>::value && is_one_of<T, data_type>::value, int> = 0>
inline autoget_component()¶ this is a simple alternative to get<T>() when used from SFINAE in operation namespace which has a struct get also templated. Usage there can cause error with older compilers
Public Static Functions
-
static void
init_storage()¶ requests the component initialize their storage