UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ByteSwap.h File Reference
#include "CoreTypes.h"
#include "HAL/PlatformCrt.h"

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

uint16 BYTESWAP_ORDER16 (uint16 Val)
 
UE_FORCEINLINE_HINT int16 BYTESWAP_ORDER16 (int16 Val)
 
uint32 BYTESWAP_ORDER32 (uint32 Val)
 
UE_FORCEINLINE_HINT int32 BYTESWAP_ORDER32 (int32 val)
 
uint64 BYTESWAP_ORDER64 (uint64 Value)
 
UE_FORCEINLINE_HINT int64 BYTESWAP_ORDER64 (int64 Value)
 
float BYTESWAP_ORDERF (float val)
 
double BYTESWAP_ORDERD (double val)
 
void BYTESWAP_ORDER_TCHARARRAY (TCHAR *str)
 
template<typename 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))

◆ BYTESWAP_ORDER32_unsigned

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

◆ INTEL_ORDER16

#define INTEL_ORDER16 (   x)    BYTESWAP_ORDER16(x)

◆ INTEL_ORDER32

#define INTEL_ORDER32 (   x)    BYTESWAP_ORDER32(x)

◆ INTEL_ORDER64

#define INTEL_ORDER64 (   x)    BYTESWAP_ORDER64(x)

◆ INTEL_ORDER_TCHARARRAY

#define INTEL_ORDER_TCHARARRAY (   x)    BYTESWAP_ORDER_TCHARARRAY(x)

◆ INTEL_ORDERF

#define INTEL_ORDERF (   x)    BYTESWAP_ORDERF(x)

◆ NETWORK_ORDER16

#define NETWORK_ORDER16 (   x)    (x)

◆ NETWORK_ORDER32

#define NETWORK_ORDER32 (   x)    (x)

◆ NETWORK_ORDER64

#define NETWORK_ORDER64 (   x)    (x)

◆ NETWORK_ORDER_TCHARARRAY

#define NETWORK_ORDER_TCHARARRAY (   x)

◆ NETWORK_ORDERF

#define NETWORK_ORDERF (   x)    (x)

Function Documentation

◆ ByteSwap() [1/10]

template<>
char16_t ByteSwap ( char16_t  Value)
inline

◆ ByteSwap() [2/10]

template<>
double ByteSwap ( double  Value)
inline

◆ ByteSwap() [3/10]

template<>
float ByteSwap ( float  Value)
inline

◆ ByteSwap() [4/10]

template<>
int16 ByteSwap ( int16  Value)
inline

◆ ByteSwap() [5/10]

template<>
int32 ByteSwap ( int32  Value)
inline

◆ ByteSwap() [6/10]

template<>
int64 ByteSwap ( int64  Value)
inline

◆ ByteSwap() [7/10]

template<typename T >
T ByteSwap ( Value)

◆ ByteSwap() [8/10]

template<>
uint16 ByteSwap ( uint16  Value)
inline

◆ ByteSwap() [9/10]

template<>
uint32 ByteSwap ( uint32  Value)
inline

◆ ByteSwap() [10/10]

template<>
uint64 ByteSwap ( uint64  Value)
inline

◆ BYTESWAP_ORDER16() [1/2]

UE_FORCEINLINE_HINT int16 BYTESWAP_ORDER16 ( int16  Val)

◆ BYTESWAP_ORDER16() [2/2]

uint16 BYTESWAP_ORDER16 ( uint16  Val)
inline

◆ BYTESWAP_ORDER32() [1/2]

UE_FORCEINLINE_HINT int32 BYTESWAP_ORDER32 ( int32  val)

◆ BYTESWAP_ORDER32() [2/2]

uint32 BYTESWAP_ORDER32 ( uint32  Val)
inline

◆ BYTESWAP_ORDER64() [1/2]

UE_FORCEINLINE_HINT int64 BYTESWAP_ORDER64 ( int64  Value)

◆ BYTESWAP_ORDER64() [2/2]

uint64 BYTESWAP_ORDER64 ( uint64  Value)
inline

◆ BYTESWAP_ORDER_TCHARARRAY()

void BYTESWAP_ORDER_TCHARARRAY ( TCHAR str)
inline

◆ BYTESWAP_ORDERD()

double BYTESWAP_ORDERD ( double  val)
inline

◆ BYTESWAP_ORDERF()

float BYTESWAP_ORDERF ( float  val)
inline