|
Orocos Real-Time Toolkit
2.6.0
|
This archive is capable of decomposing objects of serialization level 1 and 2 into part data sources. More...
#include <rtt/types/type_discovery.hpp>
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) |
| template<class T > | |
| void | discover (T &t) |
| This function discovers all parts of a serializable struct and creates a DataSource object for each member of that struct. | |
| template<class T > | |
| base::DataSourceBase::shared_ptr | discoverMember (T &t, const std::string name) |
| 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. | |
| template<class T > | |
| bool | referenceMember (internal::Reference *ref, T &t, const std::string name) |
| This function discovers a single part of a serializable struct and sets a reference to that member of that struct. | |
| 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_discovery & | operator>> (T &t) |
| Saving Archive Concept::operator<<. | |
| template<class T > | |
| type_discovery & | operator& (T &t) |
| Saving Archive Concept::operator&. | |
| template<class T > | |
| type_discovery & | load_a_type (T &t, boost::mpl::true_) |
| Specialisation for writing out primitive types. | |
| template<class T > | |
| type_discovery & | load_a_type (T &t, boost::mpl::false_) |
| Specialisation for writing out composite types (objects). | |
| template<class T > | |
| type_discovery & | load_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_discovery & | load_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_discovery & | load_a_type (const T *&, boost::mpl::false_) |
| We do not support pointer types. | |
| template<class T > | |
| type_discovery & | load_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. | |
| PartNames | mnames |
| The names of the parts of the parent struct. | |
| std::string | membername |
| If non-empty, only discover the member with this name. | |
| internal::Reference * | mref |
| If non-empty, use this reference to the member with name membername. | |
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.
| RTT::types::type_discovery::type_discovery | ( | ) | [inline] |
Constructor which only introspects the part names.
No parts will be created.
Definition at line 148 of file type_discovery.hpp.
| 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.
Referenced by discoverMember(), and referenceMember().
| unsigned int RTT::types::type_discovery::get_library_version | ( | ) | [inline] |
Loading Archive Concept::get_library_version()
Definition at line 208 of file type_discovery.hpp.
| type_discovery& RTT::types::type_discovery::load_a_type | ( | T & | t, |
| boost::mpl::true_ | |||
| ) | [inline] |
Specialisation for writing out primitive types.
| t | primitive data (bool, int,...) |
Definition at line 269 of file type_discovery.hpp.
References mparent, and mparts.
Referenced by operator>>().
| type_discovery& RTT::types::type_discovery::load_a_type | ( | T & | t, |
| boost::mpl::false_ | |||
| ) | [inline] |
Specialisation for writing out composite types (objects).
| t | a serializable class or struct. |
Definition at line 284 of file type_discovery.hpp.
| 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.
| t |
Definition at line 296 of file type_discovery.hpp.
| 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.
| t |
Definition at line 308 of file type_discovery.hpp.
| type_discovery& RTT::types::type_discovery::load_a_type | ( | const T *& | , |
| boost::mpl::false_ | |||
| ) | [inline] |
We do not support pointer types.
| t | |
| @return |
Definition at line 321 of file type_discovery.hpp.
| 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.
References membername, mnames, mparent, mref, and RTT::internal::Reference::setReference().
| 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 !
| x | |
| bos |
Definition at line 236 of file type_discovery.hpp.
| type_discovery& RTT::types::type_discovery::operator& | ( | T & | t | ) | [inline] |
Saving Archive Concept::operator&.
| t | The type to load. |
Definition at line 258 of file type_discovery.hpp.
References operator>>().
| type_discovery& RTT::types::type_discovery::operator>> | ( | T & | t | ) | [inline] |
Saving Archive Concept::operator<<.
| t | The type to load. |
Definition at line 247 of file type_discovery.hpp.
References load_a_type().
Referenced by operator&().
| 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)
| The | data type to register in this archive. |
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)
| new_address | |
| old_address |
Definition at line 215 of file type_discovery.hpp.
1.7.6.1