TPIE

v1.1rc1-6-g0c97303
tpie::unserializer Class Reference

Class for unserializing binary data serialized with the serializer Data can be unserialized using the >> operators. More...

#include <tpie/serialization.h>

Public Member Functions

 unserializer (std::istream &in)
 Construct a unserializer reading from the std::istream in. More...
 
template<typename T >
unserializeroperator<< (const T &x)
 
unserializeroperator<< (const char *x)
 
template<typename T >
unserializerread (T *array, size_t &size)
 
template<typename T >
boost::enable_if< disjunction
< boost::is_fundamental< T >
, boost::is_enum< T >
>, unserializer & >::type 
operator>> (T &x)
 
template<typename T1 , typename T2 >
unserializeroperator>> (std::pair< T1, T2 > &p)
 
template<typename T >
unserializeroperator>> (std::vector< T > &v)
 
unserializeroperator>> (std::string &s)
 

Detailed Description

Class for unserializing binary data serialized with the serializer Data can be unserialized using the >> operators.

The << operators can be used to validate data in the serialation.

Definition at line 129 of file serialization.h.

Constructor & Destructor Documentation

tpie::unserializer::unserializer ( std::istream &  in)
inline

Construct a unserializer reading from the std::istream in.

Definition at line 134 of file serialization.h.

134  : m_in(in), m_typesafe(false) {
135  //Validate header;
136  *this << "TPIE Serialization"
137  << (boost::uint16_t)1;
138  bool typesafe;
139  *this >> typesafe;
140  m_typesafe=typesafe;
141  }

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