The Nebula Device 3: System::ByteOrder Class Reference

The Nebula Device 3

System::ByteOrder Class Reference

#include <byteorder.h>


Detailed Description

Provides information and methods to help with byte ordering issues.

The following byte orders are defined:

  • ByteOrder::LittleEndian: Intel byte order
  • ByteOrder::BigEndian: Motorola byte order
  • ByteOrder::Network network byte order (always big endian)
  • ByteOrder::Host hardwired to little or big endian depending on host cpu

NOTE: on console-platforms it is strongly recommended to store binary data in console-byte-order during asset processing on the development PC, so that the console doesn't waste loading time with byte conversions!

(C) 2007 Radon Labs GmbH

Static Public Member Functions

static short ConvertShort (Type fromByteOrder, Type toByteOrder, short val)
 endian-convert short value
static ushort ConvertUShort (Type fromByteOrder, Type toByteOrder, ushort val)
 endian-convert ushort value
static int ConvertInt (Type fromByteOrder, Type toByteOrder, int val)
 endian-convert int value
static uint ConvertUInt (Type fromByteOrder, Type toByteOrder, uint val)
 endian-convert uint value
static float ConvertFloat (Type fromByteOrder, Type toByteOrder, float val)
 endian-convert float value
static double ConvertDouble (Type fromByteOrder, Type toByteOrder, double val)
 endian-convert double value
static Math::float4 ConvertFloat4 (Type fromByteOrder, Type toByteOrder, const Math::float4 &val)
 endian-convert float4 value
static Math::matrix44 ConvertMatrix44 (Type fromByteOrder, Type toByteOrder, const Math::matrix44 &val)
 endian convert matrix44 value