Bond 0.9
C++ Bond Runtime Library API Documentation
Loading...
Searching...
No Matches
Endian

These functions provide functionality for manipulating byte order. More...

Functions

void Bond::SwapBytes (uint8_t &a, uint8_t &b)
 Swaps the value of two bytes.
void Bond::ReverseByteOrder16 (uint8_t value[2])
 Reverses the order of two bytes in place.
void Bond::ReverseByteOrder32 (uint8_t value[4])
 Reverses the order of four bytes in place.
void Bond::ReverseByteOrder64 (uint8_t value[8])
 Reverses the order of eight bytes in place.
Value16 Bond::ReverseByteOrder16 (Value16 value)
 Returns a 16 bit value with its byte order reversed.
Value32 Bond::ReverseByteOrder32 (Value32 value)
 Returns a 32 bit value with its byte order reversed.
Value64 Bond::ReverseByteOrder64 (Value64 value)
 Returns a 64 bit value with its byte order reversed.
void Bond::ConvertBigEndian16 (void *value)
 Converts the byte order of a 16 bit value from native byte order to big endian or vice versa in place.
Value16 Bond::ConvertBigEndian16 (Value16 value)
 Converts the byte order of a 16 bit value from native byte order to big endian or vice versa and returns the new value.
int16_t Bond::ConvertBigEndianI16 (int16_t value)
 Converts the byte order of an int16_t from native byte order to big endian or vice versa and returns the new value.
uint16_t Bond::ConvertBigEndianU16 (uint16_t value)
 Converts the byte order of an uint16_t from native byte order to big endian or vice versa and returns the new value.
void Bond::ConvertBigEndian32 (void *value)
 Converts the byte order of a 32 bit value from native byte order to big endian or vice versa in place.
Value32 Bond::ConvertBigEndian32 (Value32 value)
 Converts the byte order of a 32 bit value from native byte order to big endian or vice versa and returns the new value.
int32_t Bond::ConvertBigEndianI32 (int32_t value)
 Converts the byte order of an int32_t from native byte order to big endian or vice versa and returns the new value.
uint32_t Bond::ConvertBigEndianU32 (uint32_t value)
 Converts the byte order of an uint32_t from native byte order to big endian or vice versa and returns the new value.
float Bond::ConvertBigEndianF32 (float value)
 Converts the byte order of a float from native byte order to big endian or vice versa and returns the new value.
void Bond::ConvertBigEndian64 (void *value)
 Converts the byte order of a 64 bit value from native byte order to big endian or vice versa and returns the new value.
Value64 Bond::ConvertBigEndian64 (Value64 value)
 Converts the byte order of a 64 bit value from native byte order to big endian or vice versa and returns the new value.
int64_t Bond::ConvertBigEndianI64 (int64_t value)
 Converts the byte order of an int64_t from native byte order to big endian or vice versa and returns the new value.
uint64_t Bond::ConvertBigEndianU64 (uint64_t value)
 Converts the byte order of an uint64_t from native byte order to big endian or vice versa and returns the new value.
double Bond::ConvertBigEndianF64 (double value)
 Converts the byte order of a double from native byte order to big endian or vice versa and returns the new value.

Detailed Description

These functions provide functionality for manipulating byte order.

#include "bond/systems/endian.h"

Function Documentation

◆ ConvertBigEndian16() [1/2]

Value16 Bond::ConvertBigEndian16 ( Value16 value)
inline

Converts the byte order of a 16 bit value from native byte order to big endian or vice versa and returns the new value.

◆ ConvertBigEndian16() [2/2]

void Bond::ConvertBigEndian16 ( void * value)
inline

Converts the byte order of a 16 bit value from native byte order to big endian or vice versa in place.

◆ ConvertBigEndian32() [1/2]

Value32 Bond::ConvertBigEndian32 ( Value32 value)
inline

Converts the byte order of a 32 bit value from native byte order to big endian or vice versa and returns the new value.

◆ ConvertBigEndian32() [2/2]

void Bond::ConvertBigEndian32 ( void * value)
inline

Converts the byte order of a 32 bit value from native byte order to big endian or vice versa in place.

◆ ConvertBigEndian64() [1/2]

Value64 Bond::ConvertBigEndian64 ( Value64 value)
inline

Converts the byte order of a 64 bit value from native byte order to big endian or vice versa and returns the new value.

◆ ConvertBigEndian64() [2/2]

void Bond::ConvertBigEndian64 ( void * value)
inline

Converts the byte order of a 64 bit value from native byte order to big endian or vice versa and returns the new value.

◆ ConvertBigEndianF32()

float Bond::ConvertBigEndianF32 ( float value)
inline

Converts the byte order of a float from native byte order to big endian or vice versa and returns the new value.

◆ ConvertBigEndianF64()

double Bond::ConvertBigEndianF64 ( double value)
inline

Converts the byte order of a double from native byte order to big endian or vice versa and returns the new value.

◆ ConvertBigEndianI16()

int16_t Bond::ConvertBigEndianI16 ( int16_t value)
inline

Converts the byte order of an int16_t from native byte order to big endian or vice versa and returns the new value.

◆ ConvertBigEndianI32()

int32_t Bond::ConvertBigEndianI32 ( int32_t value)
inline

Converts the byte order of an int32_t from native byte order to big endian or vice versa and returns the new value.

◆ ConvertBigEndianI64()

int64_t Bond::ConvertBigEndianI64 ( int64_t value)
inline

Converts the byte order of an int64_t from native byte order to big endian or vice versa and returns the new value.

◆ ConvertBigEndianU16()

uint16_t Bond::ConvertBigEndianU16 ( uint16_t value)
inline

Converts the byte order of an uint16_t from native byte order to big endian or vice versa and returns the new value.

◆ ConvertBigEndianU32()

uint32_t Bond::ConvertBigEndianU32 ( uint32_t value)
inline

Converts the byte order of an uint32_t from native byte order to big endian or vice versa and returns the new value.

◆ ConvertBigEndianU64()

uint64_t Bond::ConvertBigEndianU64 ( uint64_t value)
inline

Converts the byte order of an uint64_t from native byte order to big endian or vice versa and returns the new value.

◆ ReverseByteOrder16() [1/2]

void Bond::ReverseByteOrder16 ( uint8_t value[2])
inline

Reverses the order of two bytes in place.

◆ ReverseByteOrder16() [2/2]

Value16 Bond::ReverseByteOrder16 ( Value16 value)
inline

Returns a 16 bit value with its byte order reversed.

◆ ReverseByteOrder32() [1/2]

void Bond::ReverseByteOrder32 ( uint8_t value[4])
inline

Reverses the order of four bytes in place.

◆ ReverseByteOrder32() [2/2]

Value32 Bond::ReverseByteOrder32 ( Value32 value)
inline

Returns a 32 bit value with its byte order reversed.

◆ ReverseByteOrder64() [1/2]

void Bond::ReverseByteOrder64 ( uint8_t value[8])
inline

Reverses the order of eight bytes in place.

◆ ReverseByteOrder64() [2/2]

Value64 Bond::ReverseByteOrder64 ( Value64 value)
inline

Returns a 64 bit value with its byte order reversed.

◆ SwapBytes()

void Bond::SwapBytes ( uint8_t & a,
uint8_t & b )
inline

Swaps the value of two bytes.