Pothos  0.5.0-ga4964040
The Pothos dataflow programming software suite
Namespaces | Functions
Numbers.hpp File Reference
#include <Pothos/Config.hpp>
#include <Pothos/Archive/Invoke.hpp>
#include <Pothos/Archive/BinaryObject.hpp>
#include <type_traits>
#include <limits>

Go to the source code of this file.

Namespaces

 Pothos
 
 Pothos::serialization
 

Functions

template<typename Archive >
void Pothos::serialization::save (Archive &ar, const bool &t, const unsigned int)
 
template<typename Archive >
void Pothos::serialization::load (Archive &ar, bool &t, const unsigned int)
 
template<typename Archive , typename T >
std::enable_if< std::is_same< T, unsigned char >::value or std::is_same< T, signed char >::value or std::is_same< T, char >::value >::type Pothos::serialization::save (Archive &ar, const T &t, const unsigned int)
 
template<typename Archive , typename T >
std::enable_if< std::is_same< T, unsigned char >::value or std::is_same< T, signed char >::value or std::is_same< T, char >::value >::type Pothos::serialization::load (Archive &ar, T &t, const unsigned int)
 
template<typename Archive , typename T >
std::enable_if< std::is_same< T, unsigned short >::value or std::is_same< T, signed short >::value >::type Pothos::serialization::save (Archive &ar, const T &t, const unsigned int)
 
template<typename Archive , typename T >
std::enable_if< std::is_same< T, unsigned short >::value or std::is_same< T, signed short >::value >::type Pothos::serialization::load (Archive &ar, T &t, const unsigned int)
 
template<typename Archive , typename T >
std::enable_if< std::is_same< T, signed int >::value or std::is_same< T, signed long >::value or std::is_same< T, signed long long >::value >::type Pothos::serialization::save (Archive &ar, const T &t, const unsigned int)
 
template<typename Archive , typename T >
std::enable_if< std::is_same< T, signed int >::value or std::is_same< T, signed long >::value or std::is_same< T, signed long long >::value >::type Pothos::serialization::load (Archive &ar, T &t, const unsigned int)
 
template<typename Archive , typename T >
std::enable_if< std::is_same< T, unsigned int >::value or std::is_same< T, unsigned long >::value or std::is_same< T, unsigned long long >::value >::type Pothos::serialization::save (Archive &ar, const T &t, const unsigned int)
 
template<typename Archive , typename T >
std::enable_if< std::is_same< T, unsigned int >::value or std::is_same< T, unsigned long >::value or std::is_same< T, unsigned long long >::value >::type Pothos::serialization::load (Archive &ar, T &t, const unsigned int)
 
template<typename Archive >
std::enable_if< std::numeric_limits< float >::is_iec559 >::type Pothos::serialization::save (Archive &ar, const float &t, const unsigned int)
 
template<typename Archive >
std::enable_if< std::numeric_limits< float >::is_iec559 >::type Pothos::serialization::load (Archive &ar, float &t, const unsigned int)
 
template<typename Archive >
std::enable_if< std::numeric_limits< double >::is_iec559 >::type Pothos::serialization::save (Archive &ar, const double &t, const unsigned int)
 
template<typename Archive >
std::enable_if< std::numeric_limits< double >::is_iec559 >::type Pothos::serialization::load (Archive &ar, double &t, const unsigned int)
 
template<typename Archive , typename T >
std::enable_if< std::is_arithmetic< T >::value >::type Pothos::serialization::serialize (Archive &ar, T &t, const unsigned int ver)
 

Detailed Description

Numeric support for serialization.

Integers are serialized into a portable byte ordering to work across big and little platform endianess. In addition, all long types get serialized as 8 bytes because the size of long may vary from 4 to 8 bytes.

Floats are cast to an integer type of identical size and serialized as an integer; also for platform endianess. The implementation assumes the IEEE-754 format for floats, but could easily be expanded for soft packing of IEEE-754.