Om  1.0.0
A universal framework for multimedia simulation
Public Types | Public Member Functions | List of all members
om::data::Endianness Class Reference

A class that describes a byte ordering format and provides endian conversion to/from that format. More...

#include <omEndian.h>

Public Types

enum  Enum { BIG, LITTLE }
 An enum that specifies the different possible endian types. More...
 

Public Member Functions

 Endianness ()
 Create a endianness type that represents the standard endianness for the current platform. More...
 
 Endianness (Enum newType)
 Create a endianness type with the specified endianness type enum value. More...
 
 operator Enum () const
 Convert this endianness type to an enum value. More...
 
template<typename T >
convertToNative (T value) const
 Convert the specified value, assumed to be in this endianness, to native endianness. More...
 
template<typename T >
convertFromNative (T value) const
 Convert the specified value, assumed to be in native endianness, to this endianness. More...
 
Bool isNative () const
 Return whether or not this Endianness is the native endianness of the current platform. More...
 
String toString () const
 Return a string representation of the endianness type. More...
 
 operator String () const
 Convert this endianness type into a string representation. More...
 

Detailed Description

A class that describes a byte ordering format and provides endian conversion to/from that format.

Member Enumeration Documentation

An enum that specifies the different possible endian types.

Enumerator
BIG 

The highest-order byte comes first in the byte order.

LITTLE 

The lowest-order byte comes first in the byte order.

Constructor & Destructor Documentation

om::data::Endianness::Endianness ( )
inline

Create a endianness type that represents the standard endianness for the current platform.

om::data::Endianness::Endianness ( Enum  newType)
inline

Create a endianness type with the specified endianness type enum value.

Member Function Documentation

om::data::Endianness::operator Enum ( ) const
inline

Convert this endianness type to an enum value.

template<typename T >
T om::data::Endianness::convertToNative ( value) const
inline

Convert the specified value, assumed to be in this endianness, to native endianness.

template<typename T >
T om::data::Endianness::convertFromNative ( value) const
inline

Convert the specified value, assumed to be in native endianness, to this endianness.

Bool om::data::Endianness::isNative ( ) const
inline

Return whether or not this Endianness is the native endianness of the current platform.

String om::data::Endianness::toString ( ) const
inline

Return a string representation of the endianness type.

om::data::Endianness::operator String ( ) const
inline

Convert this endianness type into a string representation.


The documentation for this class was generated from the following file: