Orocos Real-Time Toolkit  2.6.0
Classes | Public Types | Public Member Functions
RTT::mqueue::binary_data_oarchive Class Reference

This archive is capable of saving objects of serialization level 1 and 2 in a binary, non-portable format. More...

#include <rtt/transports/mqueue/binary_data_archive.hpp>

List of all members.

Classes

struct  use_array_optimization
 We provide an optimized load for all fundamental types typedef serialization::is_bitwise_serializable<mpl::_1> use_array_optimization;. More...

Public Types

typedef char Elem
typedef boost::mpl::bool_< false > is_loading
 Saving Archive Concept::is_loading.
typedef boost::mpl::bool_< true > is_saving
 Saving Archive Concept::is_saving.

Public Member Functions

 binary_data_oarchive (std::ostream &os, bool do_save=true)
 Constructor from a standard output stream.
 binary_data_oarchive (std::streambuf &sb, bool do_save=true)
 Constructor from a standard stream buffer.
unsigned int get_library_version ()
 Saving Archive Concept::get_library_version()
template<class T >
const
boost::archive::detail::basic_pointer_iserializer * 
register_type (T *=NULL)
 Saving Archive Concept::register_type<T>() and ::register_type(u)
void save_object (const void *x, const boost::archive::detail::basic_oserializer &bos)
 Note: not in LoadArchive concept but required when we use archive::save !
template<class T >
binary_data_oarchiveoperator<< (T const &t)
 Saving Archive Concept::operator<<.
template<class T >
binary_data_oarchiveoperator& (T const &t)
 Saving Archive Concept::operator&.
void save_binary (const void *address, std::size_t count)
 Saving Archive Concept::save_binary(u, count)
template<class T >
binary_data_oarchivesave_a_type (T const &t, boost::mpl::true_)
 Specialisation for writing out primitive types.
template<class T >
binary_data_oarchivesave_a_type (T const &t, boost::mpl::false_)
 Specialisation for writing out composite types (objects).
template<class ValueType >
void save_array (boost::serialization::array< ValueType > const &a, unsigned int)
 The optimized save_array dispatches to save_binary.
int getArchiveSize ()
 Helper method to say how much we wrote.

Detailed Description

This archive is capable of saving objects of serialization level 1 and 2 in a binary, non-portable format.

See also:
binary_data_iarchive

Definition at line 344 of file binary_data_archive.hpp.


Constructor & Destructor Documentation

RTT::mqueue::binary_data_oarchive::binary_data_oarchive ( std::ostream &  os,
bool  do_save = true 
) [inline]

Constructor from a standard output stream.

Parameters:
osThe stream to serialize to
do_saveSet to false to not actually write nor use the given ostream. After a save operation, only the counter for getArchiveSize() will have increased. Use this to know in advance how much space you will need.

Definition at line 368 of file binary_data_archive.hpp.

RTT::mqueue::binary_data_oarchive::binary_data_oarchive ( std::streambuf &  sb,
bool  do_save = true 
) [inline]

Constructor from a standard stream buffer.

Parameters:
osThe buffer to serialize to.
do_saveSet to false to not actually write nor use the given ostream. After a save operation, only the counter for getArchiveSize() will have increased. Use this to know in advance how much space you will need.

Definition at line 381 of file binary_data_archive.hpp.


Member Function Documentation

Saving Archive Concept::get_library_version()

Returns:
This library's version.

Definition at line 390 of file binary_data_archive.hpp.

template<class T >
binary_data_oarchive& RTT::mqueue::binary_data_oarchive::operator& ( T const &  t) [inline]

Saving Archive Concept::operator&.

Parameters:
tThe type to save.
Returns:
*this

Definition at line 430 of file binary_data_archive.hpp.

References operator<<().

template<class T >
binary_data_oarchive& RTT::mqueue::binary_data_oarchive::operator<< ( T const &  t) [inline]

Saving Archive Concept::operator<<.

Parameters:
tThe type to save.
Returns:
*this

Definition at line 420 of file binary_data_archive.hpp.

References save_a_type().

Referenced by operator&().

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

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

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

Definition at line 399 of file binary_data_archive.hpp.

template<class T >
binary_data_oarchive& RTT::mqueue::binary_data_oarchive::save_a_type ( T const &  t,
boost::mpl::true_   
) [inline]

Specialisation for writing out primitive types.

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

Definition at line 466 of file binary_data_archive.hpp.

References save_binary().

Referenced by operator<<().

template<class T >
binary_data_oarchive& RTT::mqueue::binary_data_oarchive::save_a_type ( T const &  t,
boost::mpl::false_   
) [inline]

Specialisation for writing out composite types (objects).

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

Definition at line 488 of file binary_data_archive.hpp.

void RTT::mqueue::binary_data_oarchive::save_binary ( const void *  address,
std::size_t  count 
) [inline]

Saving Archive Concept::save_binary(u, count)

Parameters:
addressThe place where data is located in memory.
countThe number of bytes to save.

Definition at line 439 of file binary_data_archive.hpp.

Referenced by save_a_type(), and save_array().

void RTT::mqueue::binary_data_oarchive::save_object ( const void *  x,
const boost::archive::detail::basic_oserializer &  bos 
) [inline]

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

Parameters:
x
bos

Definition at line 406 of file binary_data_archive.hpp.


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