OSVR-Core
Classes | Namespaces | Functions
Endianness.h File Reference

Header. More...

#include <osvr/Util/StdInt.h>
#include <osvr/Common/IntegerByteSwap.h>
#include <boost/version.hpp>
#include <boost/detail/endian.hpp>
#include <boost/integer.hpp>
#include <type_traits>
#include <string.h>

Go to the source code of this file.

Classes

struct  osvr::common::serialization::NetworkByteOrderTraits< T, Dummy >
 
struct  osvr::common::serialization::detail::NoOpHostNetworkConversion< T >
 Stock implementation of a no-op host-network conversion. More...
 
struct  osvr::common::serialization::detail::IntegerByteOrderSwap< T >
 Stock implementation of a byte-swapping host-network conversion. More...
 
struct  osvr::common::serialization::detail::TypePunByteOrder< T, UnsignedIntType >
 Stock implementation of a type-punning host-network conversion. More...
 
struct  osvr::common::serialization::NetworkByteOrderTraits< double, void >
 

Namespaces

 osvr
 The main namespace for all C++ elements of the framework, internal and external.
 
 osvr::common
 Handles spatial transformations.
 

Functions

template<typename Dest , typename Src >
Dest osvr::common::serialization::safe_pun (Src const src)
 Take the binary representation of a value with one type, and return it as another type, without breaking strict aliasing. More...
 
template<typename T >
T osvr::common::serialization::ntoh (T const v)
 Convert network byte order (big endian) to host byte order.
 
template<typename T >
T osvr::common::serialization::hton (T const v)
 Convert host byte order to network byte order (big endian)
 

Detailed Description

Header.

Date
2015
Author
Sensics, Inc. http://sensics.com/osvr

Function Documentation

§ safe_pun()

template<typename Dest , typename Src >
Dest osvr::common::serialization::safe_pun ( Src const  src)
inline

Take the binary representation of a value with one type, and return it as another type, without breaking strict aliasing.