MIRA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Enumerations | Functions
Endian.h File Reference

Utilities for byte order conversion between little and big endian. More...

#include <type_traits>
#include <boost/version.hpp>
#include <boost/detail/endian.hpp>
#include <platform/Types.h>
Include dependency graph for Endian.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  NetworkTypeTrait< T >
 Trait that specifies the conversion type of a given data type. More...
 
struct  NetworkTypeTrait< float >
 Specialization for float. More...
 
struct  NetworkTypeTrait< double >
 Specialization for double. More...
 

Namespaces

 mira
 specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
 

Enumerations

enum  Endian { LITTLE_ENDIAN_ORDER, BIG_ENDIAN_ORDER, NETWORK_ENDIAN_ORDER = BIG_ENDIAN_ORDER }
 Enum that specifies the endianness of the host system. More...
 

Functions

template<typename T >
NetworkTypeTrait< T >::Type hostToNetwork (const T &value)
 Converts a value from host byte order to network byte order. More...
 
template<>
NetworkTypeTrait< float >::Type hostToNetwork< float > (const float &value)
 Specialization for float. More...
 
template<>
NetworkTypeTrait< double >::Type hostToNetwork< double > (const double &value)
 Specialization for double. More...
 
template<typename T >
networkToHost (const typename NetworkTypeTrait< T >::Type &value)
 Converts a value from network byte order to host byte order. More...
 
template<>
float networkToHost (const NetworkTypeTrait< float >::Type &value)
 Specialization for float. More...
 
template<>
double networkToHost (const NetworkTypeTrait< double >::Type &value)
 Specialization for double. More...
 

Detailed Description

Utilities for byte order conversion between little and big endian.

Author
Tim Langner
Date
2010/06/28