proxygen
folly::Endian Class Reference

#include <Bits.h>

Public Types

enum  Order : uint8_t { Order::LITTLE, Order::BIG }
 

Static Public Member Functions

template<class T >
static T swap (T x)
 
template<class T >
static T big (T x)
 
template<class T >
static T little (T x)
 
static uint64_t swap64 (uint64_t x)
 
static uint64_t big64 (uint64_t x)
 
static uint64_t little64 (uint64_t x)
 
static int64_t swap64 (int64_t x)
 
static int64_t big64 (int64_t x)
 
static int64_t little64 (int64_t x)
 
static uint32_t swap32 (uint32_t x)
 
static uint32_t big32 (uint32_t x)
 
static uint32_t little32 (uint32_t x)
 
static int32_t swap32 (int32_t x)
 
static int32_t big32 (int32_t x)
 
static int32_t little32 (int32_t x)
 
static uint16_t swap16 (uint16_t x)
 
static uint16_t big16 (uint16_t x)
 
static uint16_t little16 (uint16_t x)
 
static int16_t swap16 (int16_t x)
 
static int16_t big16 (int16_t x)
 
static int16_t little16 (int16_t x)
 
static uint8_t swap8 (uint8_t x)
 
static uint8_t big8 (uint8_t x)
 
static uint8_t little8 (uint8_t x)
 
static int8_t swap8 (int8_t x)
 
static int8_t big8 (int8_t x)
 
static int8_t little8 (int8_t x)
 

Static Public Attributes

static constexpr Order order = kIsLittleEndian ? Order::LITTLE : Order::BIG
 

Detailed Description

Definition at line 245 of file Bits.h.

Member Enumeration Documentation

Enumerator
LITTLE 
BIG 

Definition at line 247 of file Bits.h.

247  : uint8_t {
248  LITTLE,
249  BIG,
250  };

Member Function Documentation

static uint16_t folly::Endian::big16 ( uint16_t  x)
inlinestatic

Definition at line 270 of file Bits.h.

static int16_t folly::Endian::big16 ( int16_t  x)
inlinestatic

Definition at line 270 of file Bits.h.

static uint32_t folly::Endian::big32 ( uint32_t  x)
inlinestatic

Definition at line 269 of file Bits.h.

static int32_t folly::Endian::big32 ( int32_t  x)
inlinestatic

Definition at line 269 of file Bits.h.

static int64_t folly::Endian::big64 ( int64_t  x)
inlinestatic

Definition at line 268 of file Bits.h.

static uint64_t folly::Endian::big64 ( uint64_t  x)
inlinestatic

Definition at line 268 of file Bits.h.

static uint8_t folly::Endian::big8 ( uint8_t  x)
inlinestatic

Definition at line 271 of file Bits.h.

static int8_t folly::Endian::big8 ( int8_t  x)
inlinestatic

Definition at line 271 of file Bits.h.

static uint16_t folly::Endian::little16 ( uint16_t  x)
inlinestatic

Definition at line 270 of file Bits.h.

static int16_t folly::Endian::little16 ( int16_t  x)
inlinestatic

Definition at line 270 of file Bits.h.

static uint32_t folly::Endian::little32 ( uint32_t  x)
inlinestatic

Definition at line 269 of file Bits.h.

static int32_t folly::Endian::little32 ( int32_t  x)
inlinestatic

Definition at line 269 of file Bits.h.

static int64_t folly::Endian::little64 ( int64_t  x)
inlinestatic

Definition at line 268 of file Bits.h.

static uint64_t folly::Endian::little64 ( uint64_t  x)
inlinestatic

Definition at line 268 of file Bits.h.

static int8_t folly::Endian::little8 ( int8_t  x)
inlinestatic

Definition at line 271 of file Bits.h.

static uint8_t folly::Endian::little8 ( uint8_t  x)
inlinestatic

Definition at line 271 of file Bits.h.

template<class T >
static T folly::Endian::swap ( T  x)
inlinestatic

Definition at line 255 of file Bits.h.

References folly::detail::EndianInt< T >::swap().

Referenced by folly::bitReverse(), and TEST().

255  {
257  }
Definition: InvokeTest.cpp:58
static T swap(T x)
Definition: Bits.h:204
static uint16_t folly::Endian::swap16 ( uint16_t  x)
inlinestatic

Definition at line 270 of file Bits.h.

static int16_t folly::Endian::swap16 ( int16_t  x)
inlinestatic

Definition at line 270 of file Bits.h.

static int32_t folly::Endian::swap32 ( int32_t  x)
inlinestatic

Definition at line 269 of file Bits.h.

static uint32_t folly::Endian::swap32 ( uint32_t  x)
inlinestatic

Definition at line 269 of file Bits.h.

static int64_t folly::Endian::swap64 ( int64_t  x)
inlinestatic

Definition at line 268 of file Bits.h.

static uint64_t folly::Endian::swap64 ( uint64_t  x)
inlinestatic

Definition at line 268 of file Bits.h.

static int8_t folly::Endian::swap8 ( int8_t  x)
inlinestatic

Definition at line 271 of file Bits.h.

static uint8_t folly::Endian::swap8 ( uint8_t  x)
inlinestatic

Definition at line 271 of file Bits.h.

Member Data Documentation

constexpr Order folly::Endian::order = kIsLittleEndian ? Order::LITTLE : Order::BIG
static

Definition at line 252 of file Bits.h.


The documentation for this class was generated from the following file: