Public Types | Public Member Functions | Public Attributes
RTT::types::type_discovery Class Reference

#include <type_discovery.hpp>

List of all members.

Public Types

typedef char Elem
typedef boost::mpl::bool_< true > is_loading
typedef boost::mpl::bool_< false > is_saving
typedef std::vector< std::string > PartNames
typedef std::vector
< base::DataSourceBase::shared_ptr
Parts

Public Member Functions

void delete_created_pointers ()
template<class T >
void discover (T &t)
template<class T >
base::DataSourceBase::shared_ptr discoverMember (T &t, const std::string name)
unsigned int get_library_version ()
base::DataSourceBase::shared_ptr getMember (const std::string name)
template<class T >
type_discoveryload_a_type (T &t, boost::mpl::true_)
template<class T >
type_discoveryload_a_type (T &t, boost::mpl::false_)
template<class T >
type_discoveryload_a_type (const boost::serialization::array< T > &t, boost::mpl::false_)
template<class T , std::size_t N>
type_discoveryload_a_type (boost::array< T, N > &t, boost::mpl::false_)
template<class T >
type_discoveryload_a_type (const T *&, boost::mpl::false_)
template<class T >
type_discoveryload_a_type (const boost::serialization::nvp< T > &t, boost::mpl::false_)
void load_object (void *x, const boost::archive::detail::basic_oserializer &bos)
template<class T >
type_discoveryoperator& (T &t)
template<class T >
type_discoveryoperator>> (T &t)
template<class T >
bool referenceMember (internal::Reference *ref, T &t, const std::string name)
template<class T >
const
boost::archive::detail::basic_pointer_iserializer * 
register_type (T *=NULL)
void reset_object_address (const void *new_address, const void *old_address)
 type_discovery (base::DataSourceBase::shared_ptr parent)
 type_discovery ()

Public Attributes

std::string membername
PartNames mnames
base::DataSourceBase::shared_ptr mparent
Parts mparts
internal::Referencemref

Detailed Description

This archive is capable of decomposing objects of serialization level 1 and 2 into part data sources.

Definition at line 94 of file type_discovery.hpp.


Member Typedef Documentation

Definition at line 125 of file type_discovery.hpp.

typedef boost::mpl::bool_<true> RTT::types::type_discovery::is_loading

Saving Archive Concept::is_loading

Definition at line 129 of file type_discovery.hpp.

typedef boost::mpl::bool_<false> RTT::types::type_discovery::is_saving

Saving Archive Concept::is_saving

Definition at line 133 of file type_discovery.hpp.

typedef std::vector<std::string> RTT::types::type_discovery::PartNames

Definition at line 103 of file type_discovery.hpp.

Definition at line 102 of file type_discovery.hpp.


Constructor & Destructor Documentation

Constructor which inspects part names and creates part data sources.

Definition at line 139 of file type_discovery.hpp.

Constructor which only introspects the part names. No parts will be created.

Definition at line 148 of file type_discovery.hpp.


Member Function Documentation

Loading Archive Concept::delete_created_pointers()

Definition at line 220 of file type_discovery.hpp.

template<class T >
void RTT::types::type_discovery::discover ( T &  t) [inline]

This function discovers all parts of a serializable struct and creates a DataSource object for each member of that struct. Use getMember() afterwards to retrieve the DataSource of each member.

Definition at line 167 of file type_discovery.hpp.

template<class T >
base::DataSourceBase::shared_ptr RTT::types::type_discovery::discoverMember ( T &  t,
const std::string  name 
) [inline]

This function discovers a single part of a serializable struct and returns an assignable datasource to that member of that struct, or a null ptr if no such member exists or if the member is not assignable.

Definition at line 181 of file type_discovery.hpp.

Loading Archive Concept::get_library_version()

Returns:
This library's version.

Definition at line 208 of file type_discovery.hpp.

Definition at line 153 of file type_discovery.hpp.

template<class T >
type_discovery& RTT::types::type_discovery::load_a_type ( T &  t,
boost::mpl::true_   
) [inline]

Specialisation for writing out primitive types.

Parameters:
tprimitive data (bool, int,...)
Returns:
*this

Definition at line 269 of file type_discovery.hpp.

template<class T >
type_discovery& RTT::types::type_discovery::load_a_type ( T &  t,
boost::mpl::false_   
) [inline]

Specialisation for writing out composite types (objects).

Parameters:
ta serializable class or struct.
Returns:
*this

Definition at line 284 of file type_discovery.hpp.

template<class T >
type_discovery& RTT::types::type_discovery::load_a_type ( const boost::serialization::array< T > &  t,
boost::mpl::false_   
) [inline]

Specialisation that converts a boost serialization array into a RTT types carray.

Parameters:
t
Returns:
*this

Definition at line 296 of file type_discovery.hpp.

template<class T , std::size_t N>
type_discovery& RTT::types::type_discovery::load_a_type ( boost::array< T, N > &  t,
boost::mpl::false_   
) [inline]

Specialisation that converts a boost::array into a RTT types carray.

Parameters:
t
Returns:
*this

Definition at line 308 of file type_discovery.hpp.

template<class T >
type_discovery& RTT::types::type_discovery::load_a_type ( const T *&  ,
boost::mpl::false_   
) [inline]

We do not support pointer types.

Parameters:
t
@return

Definition at line 321 of file type_discovery.hpp.

template<class T >
type_discovery& RTT::types::type_discovery::load_a_type ( const boost::serialization::nvp< T > &  t,
boost::mpl::false_   
) [inline]

special treatment for name-value pairs. Since all types pass here, we take some decisions early

Definition at line 331 of file type_discovery.hpp.

void RTT::types::type_discovery::load_object ( void *  x,
const boost::archive::detail::basic_oserializer &  bos 
) [inline]

Note: not in LoadArchive concept but required when we use archive::load !

Parameters:
x
bos

Definition at line 236 of file type_discovery.hpp.

template<class T >
type_discovery& RTT::types::type_discovery::operator& ( T &  t) [inline]

Saving Archive Concept::operator&

Parameters:
tThe type to load.
Returns:
*this

Definition at line 258 of file type_discovery.hpp.

template<class T >
type_discovery& RTT::types::type_discovery::operator>> ( T &  t) [inline]

Saving Archive Concept::operator<<

Parameters:
tThe type to load.
Returns:
*this

Definition at line 247 of file type_discovery.hpp.

template<class T >
bool RTT::types::type_discovery::referenceMember ( internal::Reference ref,
T &  t,
const std::string  name 
) [inline]

This function discovers a single part of a serializable struct and sets a reference to that member of that struct.

Definition at line 194 of file type_discovery.hpp.

template<class T >
const boost::archive::detail::basic_pointer_iserializer* RTT::types::type_discovery::register_type ( T *  = NULL) [inline]

Loading Archive Concept::register_type<T>() and ::register_type(u)

Parameters:
Thedata type to register in this archive.
Returns:

Definition at line 229 of file type_discovery.hpp.

void RTT::types::type_discovery::reset_object_address ( const void *  new_address,
const void *  old_address 
) [inline]

Loading Archive Concept::reset_object_address(v,u)

Parameters:
new_address
old_address

Definition at line 215 of file type_discovery.hpp.


Member Data Documentation

If non-empty, only discover the member with this name.

Definition at line 117 of file type_discovery.hpp.

The names of the parts of the parent struct

Definition at line 112 of file type_discovery.hpp.

The parent struct we're deserializing

Definition at line 100 of file type_discovery.hpp.

The parts of the parent struct

Definition at line 107 of file type_discovery.hpp.

If non-empty, use this reference to the member with name membername.

Definition at line 123 of file type_discovery.hpp.


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


rtt
Author(s): RTT Developers
autogenerated on Mon Oct 6 2014 03:14:00