29 #ifndef CO_DATAOSTREAMARCHIVE_H
30 #define CO_DATAOSTREAMARCHIVE_H
33 #include <co/dataOStream.h>
34 #include <co/dataStreamArchiveException.h>
36 #include <boost/version.hpp>
38 #include <boost/archive/basic_binary_oarchive.hpp>
39 #include <boost/archive/detail/register_archive.hpp>
40 #include <boost/serialization/is_bitwise_serializable.hpp>
41 #if BOOST_VERSION >= 104400
42 # include <boost/serialization/item_version_type.hpp>
45 #include <boost/spirit/home/support/detail/endian.hpp>
46 #include <boost/spirit/home/support/detail/math/fpclassify.hpp>
48 #include <boost/type_traits/is_integral.hpp>
49 #include <boost/type_traits/is_signed.hpp>
50 #include <boost/type_traits/is_floating_point.hpp>
58 :
public boost::archive::basic_binary_oarchive< DataOStreamArchive >
60 typedef boost::archive::basic_binary_oarchive< DataOStreamArchive > Super;
67 CO_API
void save_binary(
const void* data, std::size_t size );
70 template<
typename T >
71 void save_array(
const boost::serialization::array< T >& a,
unsigned int );
78 :
public boost::serialization::is_bitwise_serializable< T > {};
82 friend class boost::archive::save_access;
90 CO_API
void save(
bool b );
93 template<
class C,
class T,
class A >
94 void save(
const std::basic_string< C, T, A >& s );
103 template<
typename T >
104 typename boost::enable_if< boost::is_integral<T> >::type save(
const T& t );
133 template<
typename T >
134 typename boost::enable_if< boost::is_floating_point<T> >::type
137 #if BOOST_VERSION >= 104400
140 CO_API
void save(
const boost::archive::library_version_type& version );
141 CO_API
void save(
const boost::archive::class_id_type& class_id );
142 CO_API
void save(
const boost::serialization::item_version_type& class_id );
144 void save(
const boost::serialization::collection_size_type& class_id );
145 CO_API
void save(
const boost::archive::object_id_type& object_id );
146 CO_API
void save(
const boost::archive::version_type& version );
149 CO_API
void _saveSignedChar(
const signed char& c );
154 #include "dataOStreamArchive.ipp"
159 BOOST_SERIALIZATION_USE_ARRAY_OPTIMIZATION(co::DataOStreamArchive)
161 #endif //CO_DATAOSTREAMARCHIVE_H
Defines export visibility macros for Collage.
A boost.serialization output archive writing to a co::DataOStream.
CO_API DataOStreamArchive(DataOStream &stream)
Construct a new serialization archive.
A std::ostream-like interface for object serialization.