byteOrder.h File Reference

Header file declaring some useful routines related to endian-ness. More...

#include <algorithm>
#include <sstream>
#include <dlrCommon/exception.h>
#include <dlrCommon/types.h>

Include dependency graph for byteOrder.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  dlr
namespace  dlr::common

Enumerations

enum  dlr::common::ByteOrder { dlr::common::DLR_BIG_ENDIAN, dlr::common::DLR_LITTLE_ENDIAN }
 This enum provides a convenient way to represent the various machine-dependent byte orderings. More...

Functions

ByteOrder dlr::common::getByteOrder ()
template<class Type>
void dlr::common::switchByteOrder (Type *dataPtr, size_t numberOfElements, ByteOrder fromByteOrder, ByteOrder toByteOrder)
 This function takes a pointer to a C-style array of values and modifies the array in place so that it has a particular byte order.
template<class Type>
void dlr::common::switchByteOrder (const Type *fromDataPtr, size_t numberOfElements, Type *toDataPtr, ByteOrder fromByteOrder, ByteOrder toByteOrder)
 This function takes a pointer to a C-style array of values and copies it into another C-style array, swapping bytes if necessary so that the output array has the specified byte order.


Detailed Description

Header file declaring some useful routines related to endian-ness.

(C) Copyright 2006-2007 David LaRose, dlr@alumni.carnegiemellon.edu See accompanying LICENSE file for details.

Revision
915
Date
2007-05-18 01:27:47 -0400 (Fri, 18 May 2007)

Definition in file byteOrder.h.


Generated on Mon Jul 9 20:34:05 2007 for dlrLibs Utility Libraries by  doxygen 1.5.2