TPIE

2362a60
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 >
std::enable_if
< std::is_fundamental< T >
::value||std::is_enum< T >
::value, 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 117 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 122 of file serialization.h.

122  : m_in(in), m_typesafe(false) {
123  //Validate header;
124  *this << "TPIE Serialization"
125  << (uint16_t)1;
126  bool typesafe;
127  *this >> typesafe;
128  m_typesafe=typesafe;
129  }

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