Xrb::Endian Namespace Reference

Used to store enumerations and functions which deal with endian identification and conversion. More...


Enumerations

enum  Endianness {
  LITTLE = 0,
  BIG,
  MACHINE = LITTLE,
  SERIALIZER = LITTLE
}
 Enumerates the indicator values for little and big endian, as well as identifying what the machine's and serializer's endianness is.

Functions

void Switch1ByteWord (void *word)
 Switches the endianness of a 1-byte word.
void Switch2ByteWord (void *word)
 Switches the endianness of a 2-byte word.
void Switch4ByteWord (void *word)
 Switches the endianness of a 4-byte word.
void Switch8ByteWord (void *word)
 Switches the endianness of a 8-byte word.
void ConvertMachineToBig1ByteWord (void *word)
 Converts a 1-byte word from machine to big endianness.
void ConvertBigToMachine1ByteWord (void *word)
 Converts a 1-byte word from big to machine endianness.
void ConvertMachineToBig2ByteWord (void *word)
 Converts a 2-byte word from machine to big endianness.
void ConvertBigToMachine2ByteWord (void *word)
 Converts a 2-byte word from big to machine endianness.
void ConvertMachineToBig4ByteWord (void *word)
 Converts a 4-byte word from machine to big endianness.
void ConvertBigToMachine4ByteWord (void *word)
 Converts a 4-byte word from big to machine endianness.
void ConvertMachineToBig8ByteWord (void *word)
 Converts a 8-byte word from machine to big endianness.
void ConvertBigToMachine8ByteWord (void *word)
 Converts a 8-byte word from big to machine endianness.
void ConvertMachineToLittle1ByteWord (void *word)
 Converts a 1-byte word from machine to little endianness.
void ConvertLittleToMachine1ByteWord (void *word)
 Converts a 1-byte word from little to machine endianness.
void ConvertMachineToLittle2ByteWord (void *word)
 Converts a 2-byte word from machine to little endianness.
void ConvertLittleToMachine2ByteWord (void *word)
 Converts a 2-byte word from little to machine endianness.
void ConvertMachineToLittle4ByteWord (void *word)
 Converts a 4-byte word from machine to little endianness.
void ConvertLittleToMachine4ByteWord (void *word)
 Converts a 4-byte word from little to machine endianness.
void ConvertMachineToLittle8ByteWord (void *word)
 Converts a 8-byte word from machine to little endianness.
void ConvertLittleToMachine8ByteWord (void *word)
 Converts a 8-byte word from little to machine endianness.
void ConvertMachineToGiven1ByteWord (void *word, Endianness const endianness)
 Converts a 1-byte word from machine to the given endianness.
void ConvertGivenToMachine1ByteWord (Endianness const endianness, void *word)
 Converts a 1-byte word from the given endianness to machine.
void ConvertMachineToGiven2ByteWord (void *word, Endianness const endianness)
 Converts a 2-byte word from machine to the given endianness.
void ConvertGivenToMachine2ByteWord (Endianness const endianness, void *word)
 Converts a 2-byte word from the given endianness to machine.
void ConvertMachineToGiven4ByteWord (void *word, Endianness const endianness)
 Converts a 4-byte word from machine to the given endianness.
void ConvertGivenToMachine4ByteWord (Endianness const endianness, void *word)
 Converts a 4-byte word from the given endianness to machine.
void ConvertMachineToGiven8ByteWord (void *word, Endianness const endianness)
 Converts a 8-byte word from machine to the given endianness.
void ConvertGivenToMachine8ByteWord (Endianness const endianness, void *word)
 Converts a 8-byte word from the given endianness to machine.


Detailed Description

Used to store enumerations and functions which deal with endian identification and conversion.


Function Documentation

void Xrb::Endian::Switch1ByteWord ( void *  word  )  [inline]

Switches the endianness of a 1-byte word.

Single-byte word endian conversion is a no-op.

Parameters:
word A pointer to the 1-byte word to be endian-switched.

Definition at line 58 of file xrb_endian.hpp.

Referenced by ConvertBigToMachine1ByteWord(), ConvertGivenToMachine1ByteWord(), ConvertLittleToMachine1ByteWord(), ConvertMachineToBig1ByteWord(), ConvertMachineToGiven1ByteWord(), and ConvertMachineToLittle1ByteWord().

void Xrb::Endian::Switch2ByteWord ( void *  word  )  [inline]

Switches the endianness of a 2-byte word.

Parameters:
word A pointer to the 2-byte word to be endian-switched.

Definition at line 66 of file xrb_endian.hpp.

Referenced by ConvertBigToMachine2ByteWord(), ConvertGivenToMachine2ByteWord(), ConvertLittleToMachine2ByteWord(), ConvertMachineToBig2ByteWord(), ConvertMachineToGiven2ByteWord(), and ConvertMachineToLittle2ByteWord().

void Xrb::Endian::Switch4ByteWord ( void *  word  )  [inline]

Switches the endianness of a 4-byte word.

Parameters:
word A pointer to the 4-byte word to be endian-switched.

Definition at line 78 of file xrb_endian.hpp.

Referenced by ConvertBigToMachine4ByteWord(), ConvertGivenToMachine4ByteWord(), ConvertLittleToMachine4ByteWord(), ConvertMachineToBig4ByteWord(), ConvertMachineToGiven4ByteWord(), and ConvertMachineToLittle4ByteWord().

void Xrb::Endian::Switch8ByteWord ( void *  word  )  [inline]

Switches the endianness of a 8-byte word.

Parameters:
word A pointer to the 8-byte word to be endian-switched.

Definition at line 94 of file xrb_endian.hpp.

Referenced by ConvertBigToMachine8ByteWord(), ConvertGivenToMachine8ByteWord(), ConvertLittleToMachine8ByteWord(), ConvertMachineToBig8ByteWord(), ConvertMachineToGiven8ByteWord(), and ConvertMachineToLittle8ByteWord().

void Xrb::Endian::ConvertMachineToBig1ByteWord ( void *  word  )  [inline]

Converts a 1-byte word from machine to big endianness.

Single-byte word endian conversion is a no-op.

Parameters:
word A pointer to the 1-byte word to be big-endian'ed.

Definition at line 124 of file xrb_endian.hpp.

References Switch1ByteWord().

void Xrb::Endian::ConvertBigToMachine1ByteWord ( void *  word  )  [inline]

Converts a 1-byte word from big to machine endianness.

Single-byte word endian conversion is a no-op.

Parameters:
word A pointer to the 1-byte word to be machine-endian'ed.

Definition at line 134 of file xrb_endian.hpp.

References Switch1ByteWord().

void Xrb::Endian::ConvertMachineToBig2ByteWord ( void *  word  )  [inline]

Converts a 2-byte word from machine to big endianness.

If this machine is big-endian, then this function is a no-op.

Parameters:
word A pointer to the 2-byte word to be big-endian'ed.

Definition at line 144 of file xrb_endian.hpp.

References Switch2ByteWord().

void Xrb::Endian::ConvertBigToMachine2ByteWord ( void *  word  )  [inline]

Converts a 2-byte word from big to machine endianness.

If this machine is big-endian, then this function is a no-op.

Parameters:
word A pointer to the 2-byte word to be machine-endian'ed.

Definition at line 154 of file xrb_endian.hpp.

References Switch2ByteWord().

void Xrb::Endian::ConvertMachineToBig4ByteWord ( void *  word  )  [inline]

Converts a 4-byte word from machine to big endianness.

If this machine is big-endian, then this function is a no-op.

Parameters:
word A pointer to the 4-byte word to be big-endian'ed.

Definition at line 164 of file xrb_endian.hpp.

References Switch4ByteWord().

void Xrb::Endian::ConvertBigToMachine4ByteWord ( void *  word  )  [inline]

Converts a 4-byte word from big to machine endianness.

If this machine is big-endian, then this function is a no-op.

Parameters:
word A pointer to the 4-byte word to be machine-endian'ed.

Definition at line 174 of file xrb_endian.hpp.

References Switch4ByteWord().

void Xrb::Endian::ConvertMachineToBig8ByteWord ( void *  word  )  [inline]

Converts a 8-byte word from machine to big endianness.

If this machine is big-endian, then this function is a no-op.

Parameters:
word A pointer to the 8-byte word to be big-endian'ed.

Definition at line 184 of file xrb_endian.hpp.

References Switch8ByteWord().

void Xrb::Endian::ConvertBigToMachine8ByteWord ( void *  word  )  [inline]

Converts a 8-byte word from big to machine endianness.

If this machine is big-endian, then this function is a no-op.

Parameters:
word A pointer to the 8-byte word to be machine-endian'ed.

Definition at line 194 of file xrb_endian.hpp.

References Switch8ByteWord().

void Xrb::Endian::ConvertMachineToLittle1ByteWord ( void *  word  )  [inline]

Converts a 1-byte word from machine to little endianness.

Single-byte word endian conversion is a no-op.

Parameters:
word A pointer to the 1-byte word to be little-endian'ed.

Definition at line 209 of file xrb_endian.hpp.

References Switch1ByteWord().

void Xrb::Endian::ConvertLittleToMachine1ByteWord ( void *  word  )  [inline]

Converts a 1-byte word from little to machine endianness.

Single-byte word endian conversion is a no-op.

Parameters:
word A pointer to the 1-byte word to be machine-endian'ed.

Definition at line 219 of file xrb_endian.hpp.

References Switch1ByteWord().

void Xrb::Endian::ConvertMachineToLittle2ByteWord ( void *  word  )  [inline]

Converts a 2-byte word from machine to little endianness.

If this machine is little-endian, then this function is a no-op.

Parameters:
word A pointer to the 2-byte word to be little-endian'ed.

Definition at line 229 of file xrb_endian.hpp.

References Switch2ByteWord().

void Xrb::Endian::ConvertLittleToMachine2ByteWord ( void *  word  )  [inline]

Converts a 2-byte word from little to machine endianness.

If this machine is little-endian, then this function is a no-op.

Parameters:
word A pointer to the 2-byte word to be machine-endian'ed.

Definition at line 239 of file xrb_endian.hpp.

References Switch2ByteWord().

void Xrb::Endian::ConvertMachineToLittle4ByteWord ( void *  word  )  [inline]

Converts a 4-byte word from machine to little endianness.

If this machine is little-endian, then this function is a no-op.

Parameters:
word A pointer to the 4-byte word to be little-endian'ed.

Definition at line 249 of file xrb_endian.hpp.

References Switch4ByteWord().

void Xrb::Endian::ConvertLittleToMachine4ByteWord ( void *  word  )  [inline]

Converts a 4-byte word from little to machine endianness.

If this machine is little-endian, then this function is a no-op.

Parameters:
word A pointer to the 4-byte word to be machine-endian'ed.

Definition at line 259 of file xrb_endian.hpp.

References Switch4ByteWord().

void Xrb::Endian::ConvertMachineToLittle8ByteWord ( void *  word  )  [inline]

Converts a 8-byte word from machine to little endianness.

If this machine is little-endian, then this function is a no-op.

Parameters:
word A pointer to the 8-byte word to be little-endian'ed.

Definition at line 269 of file xrb_endian.hpp.

References Switch8ByteWord().

void Xrb::Endian::ConvertLittleToMachine8ByteWord ( void *  word  )  [inline]

Converts a 8-byte word from little to machine endianness.

If this machine is little-endian, then this function is a no-op.

Parameters:
word A pointer to the 8-byte word to be machine-endian'ed.

Definition at line 279 of file xrb_endian.hpp.

References Switch8ByteWord().

void Xrb::Endian::ConvertMachineToGiven1ByteWord ( void *  word,
Endianness const   endianness 
) [inline]

Converts a 1-byte word from machine to the given endianness.

Single-byte word endian conversion is a no-op.

Parameters:
word A pointer to the 1-byte word to be converted.
endianness The desired endianness of the word.

Definition at line 295 of file xrb_endian.hpp.

References Switch1ByteWord().

void Xrb::Endian::ConvertGivenToMachine1ByteWord ( Endianness const   endianness,
void *  word 
) [inline]

Converts a 1-byte word from the given endianness to machine.

Single-byte word endian conversion is a no-op.

Parameters:
endianness The current endianness of the word.
word A pointer to the 1-byte word to be converted.

Definition at line 306 of file xrb_endian.hpp.

References Switch1ByteWord().

void Xrb::Endian::ConvertMachineToGiven2ByteWord ( void *  word,
Endianness const   endianness 
) [inline]

Converts a 2-byte word from machine to the given endianness.

If the given endianness matches the machine's, then this function is a no-op.

Parameters:
word A pointer to the 2-byte word to be converted.
endianness The desired endianness of the word.

Definition at line 317 of file xrb_endian.hpp.

References Switch2ByteWord().

void Xrb::Endian::ConvertGivenToMachine2ByteWord ( Endianness const   endianness,
void *  word 
) [inline]

Converts a 2-byte word from the given endianness to machine.

If the given endianness matches the machine's, then this function is a no-op.

Parameters:
endianness The current endianness of the word.
word A pointer to the 2-byte word to be converted.

Definition at line 328 of file xrb_endian.hpp.

References Switch2ByteWord().

void Xrb::Endian::ConvertMachineToGiven4ByteWord ( void *  word,
Endianness const   endianness 
) [inline]

Converts a 4-byte word from machine to the given endianness.

If the given endianness matches the machine's, then this function is a no-op.

Parameters:
word A pointer to the 4-byte word to be converted.
endianness The desired endianness of the word.

Definition at line 339 of file xrb_endian.hpp.

References Switch4ByteWord().

void Xrb::Endian::ConvertGivenToMachine4ByteWord ( Endianness const   endianness,
void *  word 
) [inline]

Converts a 4-byte word from the given endianness to machine.

If the given endianness matches the machine's, then this function is a no-op.

Parameters:
endianness The current endianness of the word.
word A pointer to the 4-byte word to be converted.

Definition at line 350 of file xrb_endian.hpp.

References Switch4ByteWord().

void Xrb::Endian::ConvertMachineToGiven8ByteWord ( void *  word,
Endianness const   endianness 
) [inline]

Converts a 8-byte word from machine to the given endianness.

If the given endianness matches the machine's, then this function is a no-op.

Parameters:
word A pointer to the 8-byte word to be converted.
endianness The desired endianness of the word.

Definition at line 361 of file xrb_endian.hpp.

References Switch8ByteWord().

void Xrb::Endian::ConvertGivenToMachine8ByteWord ( Endianness const   endianness,
void *  word 
) [inline]

Converts a 8-byte word from the given endianness to machine.

If the given endianness matches the machine's, then this function is a no-op.

Parameters:
endianness The current endianness of the word.
word A pointer to the 8-byte word to be converted.

Definition at line 372 of file xrb_endian.hpp.

References Switch8ByteWord().


Hosted by SourceForge.net Logo -- Generated on Fri Aug 21 21:46:39 2009 for XuqRijBuh by doxygen 1.5.8