Nebula
Loading...
Searching...
No Matches
Ids::Id Class Reference

#include <id.h>

Detailed Description

This class implements some static helper functions to set high and low 32-bit integers, as well as a function to create a complete id from two of them.

Static Public Member Functions

static void SetHigh (Id64 &id, const Id32 bits)
 set high (leftmost) 32 bits
 
static constexpr Id32 GetHigh (const Id64 id)
 get high (leftmost) 32 bits
 
static constexpr Id16 GetHigh (const Id32 bits)
 get high bits in integer
 
static constexpr Id24 GetBig (const Id32 bits)
 get big piece of 24-8 bit integer
 
static constexpr Id8 GetTiny (const Id32 bits)
 get tiny piece of 24-8 bit integer
 
static void SetLow (Id64 &id, const Id32 bits)
 set low (rightmost) 32 bits
 
static constexpr Id32 GetLow (const Id64 id)
 get low (rightmost) 32 bits
 
static constexpr Id16 GetLow (const Id32 bits)
 get low bits in integer
 
static constexpr Id64 MakeId64 (const Id32 low, const Id32 high)
 create new Id using both high and low bits
 
static constexpr Id32 MakeId32 (const Id16 high, const Id16 low)
 set 16-16 bits id by low and high
 
static constexpr Id32 MakeId24_8 (const Id24 big, const Id8 tiny)
 set 24-8 bits in integer
 
static constexpr Id64 MakeId32_24_8 (const Id32 upper, const Id24 big, const Id8 tiny)
 set 32-24-8 bits 64 bit integer
 
static constexpr Id64 MakeId32_16_16 (const Id32 upper, const Id16 high, const Id16 low)
 set 32-16-16 bits 64 bit integer
 
static constexpr Id64 MakeId24_8_24_8 (const Id24 big0, const Id8 tiny0, const Id24 big1, const Id8 tiny1)
 set 24-8-24-8 bits 64 bit integer
 
static void Split64 (Id64 split, Id32 &upper, Id32 &lower)
 split 64 bit integer into 2 32 0bit integers
 
static void Split32 (Id32 split, Id16 &upper, Id16 &lower)
 split 32 bit integer into 2 16 bit integers
 
static void Split24_8 (Id32 split, Id24 &big, Id8 &tiny)
 split 32 bit integer into 24-8 bit integer
 

Member Function Documentation

◆ GetBig()

constexpr Id32 Ids::Id::GetBig ( const Id32 bits)
inlinestaticconstexpr

get big piece of 24-8 bit integer

◆ GetHigh() [1/2]

constexpr Id16 Ids::Id::GetHigh ( const Id32 bits)
inlinestaticconstexpr

get high bits in integer

◆ GetHigh() [2/2]

constexpr Id32 Ids::Id::GetHigh ( const Id64 id)
inlinestaticconstexpr

get high (leftmost) 32 bits

◆ GetLow() [1/2]

constexpr Id16 Ids::Id::GetLow ( const Id32 bits)
inlinestaticconstexpr

get low bits in integer

◆ GetLow() [2/2]

constexpr Id32 Ids::Id::GetLow ( const Id64 id)
inlinestaticconstexpr

get low (rightmost) 32 bits

◆ GetTiny()

constexpr Id8 Ids::Id::GetTiny ( const Id32 bits)
inlinestaticconstexpr

get tiny piece of 24-8 bit integer

◆ MakeId24_8()

constexpr Id32 Ids::Id::MakeId24_8 ( const Id24 big,
const Id8 tiny )
inlinestaticconstexpr

set 24-8 bits in integer

◆ MakeId24_8_24_8()

constexpr Id64 Ids::Id::MakeId24_8_24_8 ( const Id24 big0,
const Id8 tiny0,
const Id24 big1,
const Id8 tiny1 )
inlinestaticconstexpr

set 24-8-24-8 bits 64 bit integer

◆ MakeId32()

constexpr Id32 Ids::Id::MakeId32 ( const Id16 high,
const Id16 low )
inlinestaticconstexpr

set 16-16 bits id by low and high

◆ MakeId32_16_16()

constexpr Id64 Ids::Id::MakeId32_16_16 ( const Id32 upper,
const Id16 high,
const Id16 low )
inlinestaticconstexpr

set 32-16-16 bits 64 bit integer

◆ MakeId32_24_8()

constexpr Id64 Ids::Id::MakeId32_24_8 ( const Id32 upper,
const Id24 big,
const Id8 tiny )
inlinestaticconstexpr

set 32-24-8 bits 64 bit integer

◆ MakeId64()

constexpr Ids::Id64 Ids::Id::MakeId64 ( const Id32 low,
const Id32 high )
inlinestaticconstexpr

create new Id using both high and low bits

◆ SetHigh()

void Ids::Id::SetHigh ( Id64 & id,
const Id32 bits )
inlinestatic

set high (leftmost) 32 bits

◆ SetLow()

void Ids::Id::SetLow ( Id64 & id,
const Id32 bits )
inlinestatic

set low (rightmost) 32 bits

◆ Split24_8()

void Ids::Id::Split24_8 ( Id32 split,
Id24 & big,
Id8 & tiny )
inlinestatic

split 32 bit integer into 24-8 bit integer

◆ Split32()

void Ids::Id::Split32 ( Id32 split,
Id16 & upper,
Id16 & lower )
inlinestatic

split 32 bit integer into 2 16 bit integers

◆ Split64()

void Ids::Id::Split64 ( Id64 split,
Id32 & upper,
Id32 & lower )
inlinestatic

split 64 bit integer into 2 32 0bit integers


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