Orocos Real-Time Toolkit  2.5.0
Public Types | Public Member Functions | Public Attributes
RTT::types::type_discovery Class Reference

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

#include <rtt/types/type_discovery.hpp>

List of all members.

Public Types

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

Public Member Functions

 type_discovery (base::DataSourceBase::shared_ptr parent)
 Constructor which inspects part names and creates part data sources.
 type_discovery ()
 Constructor which only introspects the part names.
base::DataSourceBase::shared_ptr getMember (const std::string name)
base::DataSourceBase::shared_ptr getConstMember (const std::string name)
template<class T >
void discover (T &t)
unsigned int get_library_version ()
 Loading Archive Concept::get_library_version()
void reset_object_address (const void *new_address, const void *old_address)
 Loading Archive Concept::reset_object_address(v,u)
void delete_created_pointers ()
 Loading Archive Concept::delete_created_pointers()
template<class T >
const
boost::archive::detail::basic_pointer_iserializer * 
register_type (T *=NULL)
 Loading Archive Concept::register_type<T>() and ::register_type(u)
void load_object (void *x, const boost::archive::detail::basic_oserializer &bos)
 Note: not in LoadArchive concept but required when we use archive::load !
template<class T >
type_discoveryoperator>> (T &t)
 Saving Archive Concept::operator<<.
template<class T >
type_discoveryoperator& (T &t)
 Saving Archive Concept::operator&.
template<class T >
type_discoveryload_a_type (T &t, boost::mpl::true_)
 Specialisation for writing out primitive types.
template<class T >
type_discoveryload_a_type (T &t, boost::mpl::false_)
 Specialisation for writing out composite types (objects).
template<class T >
type_discoveryload_a_type (const boost::serialization::array< T > &t, boost::mpl::false_)
 Specialisation that converts a boost serialization array into a RTT types carray.
template<class T , std::size_t N>
type_discoveryload_a_type (boost::array< T, N > &t, boost::mpl::false_)
 Specialisation that converts a boost::array into a RTT types carray.
template<class T >
type_discoveryload_a_type (const T *&, boost::mpl::false_)
 We do not support pointer types.
template<class T >
type_discoveryload_a_type (const boost::serialization::nvp< T > &t, boost::mpl::false_)
 special treatment for name-value pairs.

Public Attributes

base::DataSourceBase::shared_ptr mparent
 The parent struct we're deserializing.
Parts mparts
 The parts of the parent struct.
Parts mcparts
 Aliases to the parts of the parent struct to emulate read-only access.
PartNames mnames
 The names of the parts of the parent struct.

Detailed Description

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

Definition at line 93 of file type_discovery.hpp.


Constructor & Destructor Documentation

Constructor which only introspects the part names.

No parts will be created.

Definition at line 142 of file type_discovery.hpp.


Member Function Documentation

Loading Archive Concept::get_library_version()

Returns:
This library's version.

Definition at line 174 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 235 of file type_discovery.hpp.

References mcparts, mparent, and mparts.

Referenced by operator>>().

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 251 of file type_discovery.hpp.

References mcparts, mparent, and mparts.

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 266 of file type_discovery.hpp.

References mcparts, mparent, and mparts.

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 283 of file type_discovery.hpp.

References mcparts, mparent, and mparts.

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 301 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 202 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 224 of file type_discovery.hpp.

References operator>>().

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 213 of file type_discovery.hpp.

References load_a_type().

Referenced by operator&().

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 195 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 181 of file type_discovery.hpp.


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