Orocos Real-Time Toolkit
2.9.0
|
This class can create three kinds of Boost Fusion Sequences. More...
#include <rtt/internal/CreateSequence.hpp>
Public Types | |
typedef create_sequence< typename mpl::pop_front< List >::type > | tail |
The tail is ourselves minus the head. More... | |
typedef mpl::front< List >::type | arg_type |
The argument type. More... | |
typedef AStore< arg_type > | arg_store_type |
The argument storage type. More... | |
typedef remove_cr< arg_type >::type | ds_arg_type |
The data source value type of an assignable data source is non-const, non-reference. More... | |
typedef mpl::if_< typename is_pure_reference< arg_type >::type, typename AssignableDataSource< ds_arg_type >::shared_ptr, typename DataSource< ds_arg_type >::shared_ptr >::type | ds_type |
The type of a single element of the vector. More... | |
typedef AssignableDataSource< ds_arg_type >::shared_ptr | ads_type |
typedef tail::type | tail_type |
The type of the tail (List - head) of our sequence. More... | |
typedef bf::cons< ds_type, tail_type > | type |
The joint DataSource<T>::shared_ptr type of head and tail, again a fusion cons. More... | |
typedef tail::atype | atail_type |
typedef bf::cons< ads_type, atail_type > | atype |
typedef tail::data_type | arg_tail_type |
typedef tail::data_store_type | arg_store_tail_type |
typedef bf::cons< arg_type, arg_tail_type > | data_type |
The joint T data type of head and tail. More... | |
typedef bf::cons< arg_store_type, arg_store_tail_type > | data_store_type |
The joint T data storage type of head and tail. More... | |
Static Public Member Functions | |
static type | sources (std::vector< base::DataSourceBase::shared_ptr >::const_iterator args, int argnbr=1) |
Converts a std::vector of DataSourceBase types into a boost::fusion Sequence of DataSources of the types given in List. More... | |
static atype | assignable (std::vector< base::DataSourceBase::shared_ptr >::const_iterator args, int argnbr=1) |
Converts a std::vector of DataSourceBase types into a boost::fusion Sequence of AssignableDataSources of the types given in List. More... | |
static data_type | data (const type &seq) |
Returns the data contained in the data sources as a Fusion Sequence. More... | |
static void | set (const data_type &in, const atype &seq) |
Sets the values of a sequence of AssignableDataSource<T> data sources ot the values contained in in using set(). More... | |
static void | load (const data_store_type &in, const atype &seq) |
Sets the values of a sequence of AssignableDataSource<T> data sources ot the values contained in in using set(). More... | |
static data_store_type | store (const data_type &in) |
Stores the values of a sequence of data_type into a data_store_type sequence for later retrieval during load. More... | |
static void | update (const type &seq) |
Calls the DataSourceBase::updated() function for each element in sequence seq, in case the element is a non-const reference type. More... | |
static type | copy (const type &seq, std::map< const base::DataSourceBase *, base::DataSourceBase * > &alreadyCloned) |
Copies a sequence of DataSource<T>::shared_ptr according to the copy/clone semantics of data sources. More... | |
static const types::TypeInfo * | GetTypeInfo (int i) |
Returns the i'th argument type info as returned by DataSource<ArgI>::GetTypeInfo(), starting from 1. More... | |
static std::string | GetType (int i) |
Returns the i'th argument type name as returned by DataSource<ArgI>::GetType(), starting from 1. More... | |
This class can create three kinds of Boost Fusion Sequences.
sources() creates a fusion sequence of (Assignable)DataSource<T>::shared_ptr from an mpl sequence and a std::vector<DataSourceBase*>. Both must have same length. The mpl sequence is typically obtained from the function_types parameter_types traits class.
assignable() creates a fusion sequence of AssignableDataSource<T>::shared_ptr from an mpl sequence and a std::vector<DataSourceBase*>. Both must have same length. The mpl sequence is typically obtained from the function_types parameter_types traits class. If the mpl sequence elements contain const qualifiers, these are removed, so T is always a value type.
data() creates a fusion sequence of T,U,V,... from the fusion sequence returned by operator(). It contains the values of the data sources obtained by calling get().
copy() creates a fusion sequence of DataSource<T>::shared_ptr from an mpl sequence and a sequence returned by operator() to do the scripting copy/clone semantics on each element of the sequence.
This is a typical head-tail recursive implementation where operator() calls itself, but in another type specialisation.
Definition at line 182 of file CreateSequence.hpp.
|
inherited |
Definition at line 217 of file CreateSequence.hpp.
|
inherited |
Definition at line 234 of file CreateSequence.hpp.
|
inherited |
The argument storage type.
Definition at line 203 of file CreateSequence.hpp.
|
inherited |
Definition at line 233 of file CreateSequence.hpp.
|
inherited |
The argument type.
Definition at line 198 of file CreateSequence.hpp.
|
inherited |
Definition at line 230 of file CreateSequence.hpp.
|
inherited |
Definition at line 231 of file CreateSequence.hpp.
|
inherited |
The joint T data storage type of head and tail.
Definition at line 244 of file CreateSequence.hpp.
|
inherited |
The joint T data type of head and tail.
Definition at line 239 of file CreateSequence.hpp.
|
inherited |
The data source value type of an assignable data source is non-const, non-reference.
Definition at line 208 of file CreateSequence.hpp.
|
inherited |
The type of a single element of the vector.
Definition at line 215 of file CreateSequence.hpp.
|
inherited |
The tail is ourselves minus the head.
Definition at line 193 of file CreateSequence.hpp.
|
inherited |
The type of the tail (List - head) of our sequence.
It is recursively formulated in terms of create_sequence.
Definition at line 223 of file CreateSequence.hpp.
|
inherited |
The joint DataSource<T>::shared_ptr type of head and tail, again a fusion cons.
Definition at line 228 of file CreateSequence.hpp.
|
inlinestaticinherited |
Converts a std::vector of DataSourceBase types into a boost::fusion Sequence of AssignableDataSources of the types given in List.
Will throw if an element of the vector could not be dynamic casted to the respective element type of List.
args | A vector of data sources |
argnbr | Leave as default. Used internally to count recursive calls. |
Definition at line 270 of file CreateSequence.hpp.
|
inlinestaticinherited |
Copies a sequence of DataSource<T>::shared_ptr according to the copy/clone semantics of data sources.
seq | A Fusion Sequence of DataSource<T>::shared_ptr |
alreadyCloned | the copy/clone map |
Definition at line 341 of file CreateSequence.hpp.
|
inlinestaticinherited |
Returns the data contained in the data sources as a Fusion Sequence.
seq | A Fusion Sequence of DataSource<T> types. |
Definition at line 284 of file CreateSequence.hpp.
|
inlinestaticinherited |
Returns the i'th argument type name as returned by DataSource<ArgI>::GetType(), starting from 1.
i | A number between 1..N with N being the number of types in the mpl List of this class. |
Definition at line 371 of file CreateSequence.hpp.
References RTT::internal::DataSourceTypeInfo< T >::getType().
|
inlinestaticinherited |
Returns the i'th argument type info as returned by DataSource<ArgI>::GetTypeInfo(), starting from 1.
i | A number between 1..N with N being the number of types in the mpl List of this class. |
Definition at line 354 of file CreateSequence.hpp.
References RTT::internal::DataSourceTypeInfo< T >::getTypeInfo().
|
inlinestaticinherited |
Sets the values of a sequence of AssignableDataSource<T> data sources ot the values contained in in using set().
in | The values to write. |
seq | The receiving assignable data sources. Because the datasources are shared pointers, it's ok to work on the temporary copies of seq. |
Definition at line 307 of file CreateSequence.hpp.
References RTT::internal::AssignHelper< Seq, Data, Enable >::set().
|
inlinestaticinherited |
Sets the values of a sequence of AssignableDataSource<T> data sources ot the values contained in in using set().
in | The values to write. |
seq | The receiving assignable data sources. |
Definition at line 294 of file CreateSequence.hpp.
References RTT::internal::AssignHelper< Seq, Data, Enable >::set().
|
inlinestaticinherited |
Converts a std::vector of DataSourceBase types into a boost::fusion Sequence of DataSources of the types given in List.
Will throw if an element of the vector could not be dynamic casted to the respective element type of List.
args | A vector of data sources |
argnbr | Leave as default. Used internally to count recursive calls. |
Definition at line 254 of file CreateSequence.hpp.
References RTT::internal::DataSourceTypeInfo< T >::getType().
Referenced by RTT::types::TemplateConstructor< S >::build().
|
inlinestaticinherited |
Stores the values of a sequence of data_type into a data_store_type sequence for later retrieval during load.
We must return the resulting sequence by value, since boost fusion returns temporaries, which we can't take a reference to.
in | The values to store |
Definition at line 320 of file CreateSequence.hpp.
|
inlinestaticinherited |
Calls the DataSourceBase::updated() function for each element in sequence seq, in case the element is a non-const reference type.
seq | A sequence of DataSource<T> objects |
Definition at line 329 of file CreateSequence.hpp.
References RTT::internal::UpdateHelper< T >::update().