Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
ByteSwap.h File Reference
#include "CoreTypes.h"
#include "HAL/PlatformCrt.h"
+ Include dependency graph for ByteSwap.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Internal
 

Macros

#define BYTESWAP_ORDER16_unsigned(x)   ((((x) >> 8) & 0xff) + (((x) << 8) & 0xff00))
 
#define BYTESWAP_ORDER32_unsigned(x)   (((x) >> 24) + (((x) >> 8) & 0xff00) + (((x) << 8) & 0xff0000) + ((x) << 24))
 
#define INTEL_ORDER16(x)   BYTESWAP_ORDER16(x)
 
#define INTEL_ORDER32(x)   BYTESWAP_ORDER32(x)
 
#define INTEL_ORDERF(x)   BYTESWAP_ORDERF(x)
 
#define INTEL_ORDER64(x)   BYTESWAP_ORDER64(x)
 
#define INTEL_ORDER_TCHARARRAY(x)   BYTESWAP_ORDER_TCHARARRAY(x)
 
#define NETWORK_ORDER16(x)   (x)
 
#define NETWORK_ORDER32(x)   (x)
 
#define NETWORK_ORDERF(x)   (x)
 
#define NETWORK_ORDER64(x)   (x)
 
#define NETWORK_ORDER_TCHARARRAY(x)
 

Functions

static FORCEINLINE uint16 Internal::ByteSwapGeneric16 (uint16 Value)
 
static FORCEINLINE uint32 Internal::ByteSwapGeneric32 (uint32 Value)
 
static FORCEINLINE uint64 Internal::ByteSwapGeneric64 (uint64 Value)
 
static FORCEINLINE uint16 BYTESWAP_ORDER16 (uint16 Val)
 
static FORCEINLINE int16 BYTESWAP_ORDER16 (int16 Val)
 
static FORCEINLINE uint32 BYTESWAP_ORDER32 (uint32 Val)
 
static FORCEINLINE int32 BYTESWAP_ORDER32 (int32 val)
 
static FORCEINLINE uint64 BYTESWAP_ORDER64 (uint64 Value)
 
static FORCEINLINE int64 BYTESWAP_ORDER64 (int64 Value)
 
static FORCEINLINE float BYTESWAP_ORDERF (float val)
 
static FORCEINLINE double BYTESWAP_ORDERD (double val)
 
static FORCEINLINE void BYTESWAP_ORDER_TCHARARRAY (TCHAR *str)
 
template<typename T >
T ByteSwap (T Value)
 
template<>
int16 ByteSwap (int16 Value)
 
template<>
uint16 ByteSwap (uint16 Value)
 
template<>
int32 ByteSwap (int32 Value)
 
template<>
uint32 ByteSwap (uint32 Value)
 
template<>
int64 ByteSwap (int64 Value)
 
template<>
uint64 ByteSwap (uint64 Value)
 
template<>
float ByteSwap (float Value)
 
template<>
double ByteSwap (double Value)
 
template<>
char16_t ByteSwap (char16_t Value)
 

Macro Definition Documentation

◆ BYTESWAP_ORDER16_unsigned

#define BYTESWAP_ORDER16_unsigned ( x)    ((((x) >> 8) & 0xff) + (((x) << 8) & 0xff00))

Definition at line 9 of file ByteSwap.h.

◆ BYTESWAP_ORDER32_unsigned

#define BYTESWAP_ORDER32_unsigned ( x)    (((x) >> 24) + (((x) >> 8) & 0xff00) + (((x) << 8) & 0xff0000) + ((x) << 24))

Definition at line 10 of file ByteSwap.h.

◆ INTEL_ORDER16

#define INTEL_ORDER16 ( x)    BYTESWAP_ORDER16(x)

Definition at line 139 of file ByteSwap.h.

◆ INTEL_ORDER32

#define INTEL_ORDER32 ( x)    BYTESWAP_ORDER32(x)

Definition at line 140 of file ByteSwap.h.

◆ INTEL_ORDER64

#define INTEL_ORDER64 ( x)    BYTESWAP_ORDER64(x)

Definition at line 142 of file ByteSwap.h.

◆ INTEL_ORDER_TCHARARRAY

#define INTEL_ORDER_TCHARARRAY ( x)    BYTESWAP_ORDER_TCHARARRAY(x)

Definition at line 143 of file ByteSwap.h.

◆ INTEL_ORDERF

#define INTEL_ORDERF ( x)    BYTESWAP_ORDERF(x)

Definition at line 141 of file ByteSwap.h.

◆ NETWORK_ORDER16

#define NETWORK_ORDER16 ( x)    (x)

Definition at line 144 of file ByteSwap.h.

◆ NETWORK_ORDER32

#define NETWORK_ORDER32 ( x)    (x)

Definition at line 145 of file ByteSwap.h.

◆ NETWORK_ORDER64

#define NETWORK_ORDER64 ( x)    (x)

Definition at line 147 of file ByteSwap.h.

◆ NETWORK_ORDER_TCHARARRAY

#define NETWORK_ORDER_TCHARARRAY ( x)

Definition at line 148 of file ByteSwap.h.

◆ NETWORK_ORDERF

#define NETWORK_ORDERF ( x)    (x)

Definition at line 146 of file ByteSwap.h.

Function Documentation

◆ ByteSwap() [1/10]

template<>
char16_t ByteSwap ( char16_t Value)
inline

Definition at line 161 of file ByteSwap.h.

◆ ByteSwap() [2/10]

template<>
double ByteSwap ( double Value)
inline

Definition at line 160 of file ByteSwap.h.

◆ ByteSwap() [3/10]

template<>
float ByteSwap ( float Value)
inline

Definition at line 159 of file ByteSwap.h.

◆ ByteSwap() [4/10]

template<>
int16 ByteSwap ( int16 Value)
inline

Definition at line 153 of file ByteSwap.h.

◆ ByteSwap() [5/10]

template<>
int32 ByteSwap ( int32 Value)
inline

Definition at line 155 of file ByteSwap.h.

◆ ByteSwap() [6/10]

template<>
int64 ByteSwap ( int64 Value)
inline

Definition at line 157 of file ByteSwap.h.

◆ ByteSwap() [7/10]

template<typename T >
T ByteSwap ( T Value)

◆ ByteSwap() [8/10]

template<>
uint16 ByteSwap ( uint16 Value)
inline

Definition at line 154 of file ByteSwap.h.

◆ ByteSwap() [9/10]

template<>
uint32 ByteSwap ( uint32 Value)
inline

Definition at line 156 of file ByteSwap.h.

◆ ByteSwap() [10/10]

template<>
uint64 ByteSwap ( uint64 Value)
inline

Definition at line 158 of file ByteSwap.h.

◆ BYTESWAP_ORDER16() [1/2]

static FORCEINLINE int16 BYTESWAP_ORDER16 ( int16 Val)
static

Definition at line 59 of file ByteSwap.h.

◆ BYTESWAP_ORDER16() [2/2]

static FORCEINLINE uint16 BYTESWAP_ORDER16 ( uint16 Val)
static

Definition at line 50 of file ByteSwap.h.

◆ BYTESWAP_ORDER32() [1/2]

static FORCEINLINE int32 BYTESWAP_ORDER32 ( int32 val)
static

Definition at line 73 of file ByteSwap.h.

◆ BYTESWAP_ORDER32() [2/2]

static FORCEINLINE uint32 BYTESWAP_ORDER32 ( uint32 Val)
static

Definition at line 64 of file ByteSwap.h.

◆ BYTESWAP_ORDER64() [1/2]

static FORCEINLINE int64 BYTESWAP_ORDER64 ( int64 Value)
static

Definition at line 87 of file ByteSwap.h.

◆ BYTESWAP_ORDER64() [2/2]

static FORCEINLINE uint64 BYTESWAP_ORDER64 ( uint64 Value)
static

Definition at line 78 of file ByteSwap.h.

◆ BYTESWAP_ORDER_TCHARARRAY()

static FORCEINLINE void BYTESWAP_ORDER_TCHARARRAY ( TCHAR * str)
static

Definition at line 115 of file ByteSwap.h.

◆ BYTESWAP_ORDERD()

static FORCEINLINE double BYTESWAP_ORDERD ( double val)
static

Definition at line 98 of file ByteSwap.h.

◆ BYTESWAP_ORDERF()

static FORCEINLINE float BYTESWAP_ORDERF ( float val)
static

Definition at line 92 of file ByteSwap.h.