mecca.lib.integers

Undocumented in source.

Public Imports

core.bitop
public import core.bitop : bswap;

Members

Aliases

NetS16
alias NetS16 = Integer!(short, networkOrder)
Undocumented in source.
NetS32
alias NetS32 = Integer!(int, networkOrder)
Undocumented in source.
NetS64
alias NetS64 = Integer!(long, networkOrder)
Undocumented in source.
NetS8
alias NetS8 = Integer!(byte, networkOrder)
Undocumented in source.
NetU16
alias NetU16 = Integer!(ushort, networkOrder)
Undocumented in source.
NetU32
alias NetU32 = Integer!(uint, networkOrder)
Undocumented in source.
NetU64
alias NetU64 = Integer!(ulong, networkOrder)
Undocumented in source.
NetU8
alias NetU8 = Integer!(ubyte, networkOrder)
Undocumented in source.
S16
alias S16 = Integer!(short, hostOrder)
Undocumented in source.
S32
alias S32 = Integer!(int, hostOrder)
Undocumented in source.
S64
alias S64 = Integer!(long, hostOrder)
Undocumented in source.
S8
alias S8 = Integer!(byte, hostOrder)
Undocumented in source.
Serial16
alias Serial16 = SerialInteger!ushort
Undocumented in source.
Serial32
alias Serial32 = SerialInteger!uint
Undocumented in source.
Serial8
alias Serial8 = SerialInteger!ubyte
Undocumented in source.
U16
alias U16 = Integer!(ushort, hostOrder)
Undocumented in source.
U32
alias U32 = Integer!(uint, hostOrder)
Undocumented in source.
U64
alias U64 = Integer!(ulong, hostOrder)
Undocumented in source.
U8
alias U8 = Integer!(ubyte, hostOrder)
Undocumented in source.

Functions

bitComplement
T bitComplement(T val)

Flip each bit of the input. Returns the same type as the input. See https://dlang.org/changelog/2.078.0.html#fix16997

bitsInValue
ubyte bitsInValue(ulong value)

Return the number of bits sufficient to cover a value

bswap
ubyte bswap(ubyte x)
Undocumented in source. Be warned that the author may not have intended to support it.
bswap
ushort bswap(ushort x)
Undocumented in source. Be warned that the author may not have intended to support it.
bswap
uint bswap(uint x)
Undocumented in source. Be warned that the author may not have intended to support it.
bswap
ulong bswap(ulong x)
Undocumented in source. Be warned that the author may not have intended to support it.
bswap
ubyte bswap(ubyte x)
Undocumented in source. Be warned that the author may not have intended to support it.
bswap
ushort bswap(ushort x)
Undocumented in source. Be warned that the author may not have intended to support it.
createBitMask
T createBitMask(uint numBits)

Create a mask with bits set bits

Manifest constants

hostOrder
enum hostOrder;
Undocumented in source.
hostOrder
enum hostOrder;
Undocumented in source.
networkOrder
enum networkOrder;
Undocumented in source.

Structs

Integer
struct Integer(T, char E)
Undocumented in source.
SerialInteger
struct SerialInteger(T)
Undocumented in source.

Meta