ByteOrder(3)

ByteOrder(3) Library Functions Manual ByteOrder(3)

NAME

ByteOrder - The ByteOrder class.

SYNOPSIS

#include <ByteOrder.h>

Public Member Functions


ByteOrder (const ByteOrder &other)
ByteOrder (uint64_t val)
ByteOrder (uint32_t val)
ByteOrder (uint16_t val)
ByteOrder (int64_t val)
ByteOrder (int32_t val)
ByteOrder (int16_t val)
ByteOrder (float val)
ByteOrder (double val)
ByteOrder & operator= (const ByteOrder &other)
operator = ByteOrder & operator= (const uint64_t &val)
operator = ByteOrder & operator= (const uint32_t &val)
operator = ByteOrder & operator= (const uint16_t &val)
operator = ByteOrder & operator= (const int64_t &val)
operator = ByteOrder & operator= (const int32_t &val)
operator = ByteOrder & operator= (const int16_t &val)
operator = ByteOrder & operator= (const float &val)
operator = ByteOrder & operator= (const double &val)
operator = operator uint64_t ()
operator uint64_t operator uint32_t ()
operator uint32_t operator uint16_t ()
operator uint16_t operator int64_t ()
operator int64_t operator int32_t ()
operator int32_t operator int16_t ()
operator int16_t operator float ()
operator float operator double ()
operator double template<typename T> void getNative (T &result)
template<typename T> void getBig (T &result)
template<typename T> void getLittle (T &result)
template<typename T> void setBig (T val)
template<typename T> void setLittle (T val)

Detailed Description

The ByteOrder class.

This class contains methods for converting numbers between different byte orders.

Warning

Input and output variables must have same type.

Constructor & Destructor Documentation

ByteOrder::ByteOrder (const ByteOrder & other)

Copy constructor.

Parameters

other ByteOrder object to be copied.

ByteOrder::ByteOrder (uint64_t val)

ByteOrder constructor.

Parameters

val uint64_t value in native byte order.

ByteOrder::ByteOrder (uint32_t val)

ByteOrder constructor.

Parameters

val uint32_t value in native byte order.

ByteOrder::ByteOrder (uint16_t val)

ByteOrder constructor.

Parameters

val uint16_t value in native byte order.

ByteOrder::ByteOrder (int64_t val)

ByteOrder constructor.

Parameters

val int64_t value in native byte order.

ByteOrder::ByteOrder (int32_t val)

ByteOrder constructor.

Parameters

val int32_t value in native byte order.

ByteOrder::ByteOrder (int16_t val)

ByteOrder constructor.

Parameters

val int16_t value in native byte order.

ByteOrder::ByteOrder (float val)

ByteOrder constructor.

Parameters

val float value in native byte order.

ByteOrder::ByteOrder (double val)

ByteOrder constructor.

Parameters

val double value in native byte order.

Member Function Documentation

template<typename T> void ByteOrder::getBig (T & result)

Copies internal variable to result variable in 'big endian' byte order.

Parameters

result Variable to be set to 'big endian' byte order.

template<typename T> void ByteOrder::getLittle (T & result)

Copies internal variable to result variable in 'little endian' byte order.

Parameters

result Variable to be set to 'little endian' byte order.

template<typename T> void ByteOrder::getNative (T & result)

Copies internal variable to result variable in native byte order.

Parameters

result Variable to be set to native byte order.

ByteOrder::operator double ()

operator double Returns double in native byte order.

ByteOrder::operator float ()

operator float Returns float in native byte order.

ByteOrder::operator int16_t ()

operator int16_t Returns int16_t in native byte order.

ByteOrder::operator int32_t ()

operator int32_t Returns int32_t in native byte order.

ByteOrder::operator int64_t ()

operator int64_t Returns int64_t in native byte order.

ByteOrder::operator uint16_t ()

operator uint16_t Returns uint16_t in native byte order.

ByteOrder::operator uint32_t ()

operator uint32_t Returns uint32_t in native byte order.

ByteOrder::operator uint64_t ()

operator uint64_t Returns uint64_t in native byte order.

ByteOrder & ByteOrder::operator= (const ByteOrder & other)

operator =

Parameters

other ByteOrder object to be copied.

Returns

Reference to ByteOrder object.

ByteOrder & ByteOrder::operator= (const double & val)

operator =

Parameters

val double value in native byte order.

Returns

Reference to ByteOrder object.

ByteOrder & ByteOrder::operator= (const float & val)

operator =

Parameters

val float value in native byte order.

Returns

Reference to ByteOrder object.

ByteOrder & ByteOrder::operator= (const int16_t & val)

operator =

Parameters

val int16_t value in native byte order.

Returns

Reference to ByteOrder object.

ByteOrder & ByteOrder::operator= (const int32_t & val)

operator =

Parameters

val int32_t value in native byte order.

Returns

Reference to ByteOrder object.

ByteOrder & ByteOrder::operator= (const int64_t & val)

operator =

Parameters

val int64_t value in native byte order.

Returns

Reference to ByteOrder object.

ByteOrder & ByteOrder::operator= (const uint16_t & val)

operator =

Parameters

val uint16_t value in native byte order.

Returns

Reference to ByteOrder object.

ByteOrder & ByteOrder::operator= (const uint32_t & val)

operator =

Parameters

val uint32_t value in native byte order.

Returns

Reference to ByteOrder object.

ByteOrder & ByteOrder::operator= (const uint64_t & val)

operator =

Parameters

val uint64_t value in native byte order.

Returns

Reference to ByteOrder object.

template<typename T> void ByteOrder::setBig (T val)

Converts and copies 'big endian' val variable to internal variable.

Parameters

val 'Big endian' value.

template<typename T> void ByteOrder::setLittle (T val)

Converts and copies 'little endian' val variable to internal variable.

Parameters

val 'Little endian' value.

Author

Generated automatically by Doxygen for LibUDB from the source code.

Version 1.0.1 LibUDB