COMBINATORIAL_BLAS 1.6
 
Loading...
Searching...
No Matches
Serialize.h File Reference
#include <iostream>
#include <sstream>
#include <vector>
#include <set>
#include <map>
#include <tuple>
Include dependency graph for Serialize.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TRIVIALLY_SERIALIZABLE(T)
 

Functions

template<class T >
void encode (std::streambuf &os, T *t, size_t size=1)
 
template<class T >
void decode (std::streambuf &os, T *t, size_t size=1)
 
 TRIVIALLY_SERIALIZABLE (char)
 
 TRIVIALLY_SERIALIZABLE (unsigned char)
 
 TRIVIALLY_SERIALIZABLE (short int)
 
 TRIVIALLY_SERIALIZABLE (unsigned short int)
 
 TRIVIALLY_SERIALIZABLE (int)
 
 TRIVIALLY_SERIALIZABLE (unsigned int)
 
 TRIVIALLY_SERIALIZABLE (long int)
 
 TRIVIALLY_SERIALIZABLE (unsigned long int)
 
 TRIVIALLY_SERIALIZABLE (long long int)
 
 TRIVIALLY_SERIALIZABLE (unsigned long long int)
 
template<class T >
void decode (std::streambuf &os, std::set< T > &v)
 
template<class T , class S >
std::enable_if< std::is_pod< T >::value &&std::is_pod< S >::value, void >::type encode (std::streambuf &os, const std::pair< T, S > &p)
 
template<class T , class S >
std::enable_if<!(std::is_pod< T >::value &&std::is_pod< S >::value), void >::type encode (std::streambuf &os, const std::pair< T, S > &p)
 
template<class T , class S >
std::enable_if< std::is_pod< T >::value &&std::is_pod< S >::value, void >::type decode (std::streambuf &os, std::pair< T, S > &p)
 
template<class T , class S >
std::enable_if<!(std::is_pod< T >::value &&std::is_pod< S >::value), void >::type decode (std::streambuf &os, std::pair< T, S > &p)
 
template<class Iter >
void encode_iter (std::streambuf &os, size_t size, Iter begin, Iter end)
 
template<class T >
std::enable_if< std::is_pod< T >::value, void >::type encode (std::streambuf &os, const std::vector< T > &v)
 
template<class T >
std::enable_if<!std::is_pod< T >::value, void >::type encode (std::streambuf &os, const std::vector< T > &v)
 
template<class T >
std::enable_if< std::is_pod< T >::value, void >::type decode (std::streambuf &os, std::vector< T > &v)
 
template<class T >
std::enable_if<!std::is_pod< T >::value, void >::type decode (std::streambuf &os, std::vector< T > &v)
 
template<class T >
void encode (std::streambuf &os, const std::set< T > &v)
 
template<class T >
void decode_thing (std::streambuf &os, T &v)
 
template<class T , class S >
void encode (std::streambuf &os, const std::map< T, S > &v)
 
template<class T , class S >
void decode (std::streambuf &os, std::map< T, S > &v)
 
template<class T , class S >
void encode (std::streambuf &os, const std::multimap< T, S > &v)
 
template<class T , class S >
void decode (std::streambuf &os, std::multimap< T, S > &v)
 

Macro Definition Documentation

◆ TRIVIALLY_SERIALIZABLE

#define TRIVIALLY_SERIALIZABLE (   T)
Value:
void encode(std::streambuf& os, const T& t) { \
encode(os, &t); \
} \
void decode(std::streambuf& os, T& t) { \
decode(os, &t); \
}
void decode(std::streambuf &os, T *t, size_t size=1)
Definition Serialize.h:26
void encode(std::streambuf &os, T *t, size_t size=1)
Definition Serialize.h:21

Definition at line 35 of file Serialize.h.

Function Documentation

◆ decode() [1/8]

template<class T , class S >
void decode ( std::streambuf &  os,
std::map< T, S > &  v 
)
inline

Definition at line 182 of file Serialize.h.

◆ decode() [2/8]

template<class T , class S >
void decode ( std::streambuf &  os,
std::multimap< T, S > &  v 
)
inline

Definition at line 195 of file Serialize.h.

◆ decode() [3/8]

template<class T , class S >
std::enable_if< std::is_pod< T >::value &&std::is_pod< S >::value, void >::type decode ( std::streambuf &  os,
std::pair< T, S > &  p 
)
inline

Definition at line 85 of file Serialize.h.

◆ decode() [4/8]

template<class T , class S >
std::enable_if<!(std::is_pod< T >::value &&std::is_pod< S >::value), void >::type decode ( std::streambuf &  os,
std::pair< T, S > &  p 
)
inline

Definition at line 92 of file Serialize.h.

◆ decode() [5/8]

template<class T >
void decode ( std::streambuf &  os,
std::set< T > &  v 
)
inline

Definition at line 169 of file Serialize.h.

◆ decode() [6/8]

template<class T >
std::enable_if< std::is_pod< T >::value, void >::type decode ( std::streambuf &  os,
std::vector< T > &  v 
)
inline

Definition at line 123 of file Serialize.h.

◆ decode() [7/8]

template<class T >
std::enable_if<!std::is_pod< T >::value, void >::type decode ( std::streambuf &  os,
std::vector< T > &  v 
)
inline

Definition at line 134 of file Serialize.h.

◆ decode() [8/8]

template<class T >
void decode ( std::streambuf &  os,
T *  t,
size_t  size = 1 
)

Definition at line 26 of file Serialize.h.

◆ decode_thing()

template<class T >
void decode_thing ( std::streambuf &  os,
T &  v 
)
inline

Definition at line 155 of file Serialize.h.

◆ encode() [1/8]

template<class T , class S >
void encode ( std::streambuf &  os,
const std::map< T, S > &  v 
)
inline

Definition at line 176 of file Serialize.h.

◆ encode() [2/8]

template<class T , class S >
void encode ( std::streambuf &  os,
const std::multimap< T, S > &  v 
)
inline

Definition at line 189 of file Serialize.h.

◆ encode() [3/8]

template<class T , class S >
std::enable_if< std::is_pod< T >::value &&std::is_pod< S >::value, void >::type encode ( std::streambuf &  os,
const std::pair< T, S > &  p 
)
inline

Definition at line 69 of file Serialize.h.

◆ encode() [4/8]

template<class T , class S >
std::enable_if<!(std::is_pod< T >::value &&std::is_pod< S >::value), void >::type encode ( std::streambuf &  os,
const std::pair< T, S > &  p 
)
inline

Definition at line 77 of file Serialize.h.

◆ encode() [5/8]

template<class T >
void encode ( std::streambuf &  os,
const std::set< T > &  v 
)
inline

Definition at line 149 of file Serialize.h.

◆ encode() [6/8]

template<class T >
std::enable_if< std::is_pod< T >::value, void >::type encode ( std::streambuf &  os,
const std::vector< T > &  v 
)
inline

Definition at line 108 of file Serialize.h.

◆ encode() [7/8]

template<class T >
std::enable_if<!std::is_pod< T >::value, void >::type encode ( std::streambuf &  os,
const std::vector< T > &  v 
)
inline

Definition at line 116 of file Serialize.h.

◆ encode() [8/8]

template<class T >
void encode ( std::streambuf &  os,
T *  t,
size_t  size = 1 
)

Definition at line 21 of file Serialize.h.

◆ encode_iter()

template<class Iter >
void encode_iter ( std::streambuf &  os,
size_t  size,
Iter  begin,
Iter  end 
)
inline

Definition at line 201 of file Serialize.h.

◆ TRIVIALLY_SERIALIZABLE() [1/10]

TRIVIALLY_SERIALIZABLE ( char  )

◆ TRIVIALLY_SERIALIZABLE() [2/10]

TRIVIALLY_SERIALIZABLE ( int  )

◆ TRIVIALLY_SERIALIZABLE() [3/10]

TRIVIALLY_SERIALIZABLE ( long int  )

◆ TRIVIALLY_SERIALIZABLE() [4/10]

TRIVIALLY_SERIALIZABLE ( long long int  )

◆ TRIVIALLY_SERIALIZABLE() [5/10]

TRIVIALLY_SERIALIZABLE ( short int  )

◆ TRIVIALLY_SERIALIZABLE() [6/10]

TRIVIALLY_SERIALIZABLE ( unsigned char  )

◆ TRIVIALLY_SERIALIZABLE() [7/10]

TRIVIALLY_SERIALIZABLE ( unsigned int  )

◆ TRIVIALLY_SERIALIZABLE() [8/10]

TRIVIALLY_SERIALIZABLE ( unsigned long int  )

◆ TRIVIALLY_SERIALIZABLE() [9/10]

TRIVIALLY_SERIALIZABLE ( unsigned long long int  )

◆ TRIVIALLY_SERIALIZABLE() [10/10]

TRIVIALLY_SERIALIZABLE ( unsigned short int  )