ByteSwapUtils.h File Reference

Utility functions to swap bytes: double, int and unsigned int. More...

#include "Config.h"
#include <cstring>
#include <boost/cstdint.hpp>

Go to the source code of this file.

Namespaces

 te
 URI C++ Library.
 
 te::common
 Namespace for the Common module of TerraLib.
 

Functions

template<class T >
void te::common::Swap2Bytes (T &v)
 It swaps two bytes in local. More...
 
void te::common::Swap2Bytes (char *v)
 It swaps an array of two bytes in local. More...
 
template<class T >
void te::common::Swap4Bytes (T &v)
 It swaps four bytes in local. More...
 
void te::common::Swap4Bytes (char *v)
 It swaps an array of four bytes in local. More...
 
void te::common::Swap8Bytes (char *v)
 It swaps an array of eight bytes in local. More...
 
template<class T >
void te::common::SwapBytes (T &v)
 It swaps the bytes in local. More...
 
template<>
void te::common::SwapBytes (boost::int16_t &v)
 It swaps 2 bytes in local. More...
 
template<>
void te::common::SwapBytes (boost::int32_t &v)
 It swaps four bytes in local. More...
 
template<>
void te::common::SwapBytes (boost::uint32_t &v)
 It swaps four bytes in local. More...
 
template<>
void te::common::SwapBytes (float &v)
 It swaps four bytes in local. More...
 

Detailed Description

Utility functions to swap bytes: double, int and unsigned int.

Definition in file ByteSwapUtils.h.