Nebula
Loading...
Searching...
No Matches
idgenerationpool.h File Reference
#include "util/array.h"
#include "id.h"
#include "util/queue.h"

Go to the source code of this file.

Classes

class  Ids::IdGenerationPool
 Provides a system for creating array friendly id numbers with reuse and generations. More...
 

Namespaces

namespace  Ids
 This simple Id pool implements a set of free and used consecutive integers.
 

Typedefs

typedef uint8_t generation_t
 

Functions

static constexpr Id24 Ids::Index (const Id32 id)
 
static constexpr generation_t Ids::Generation (const Id32 id)
 
static Id32 Ids::CreateId (const Id24 index, generation_t generation)
 

Variables

const uint32_t ID_BITS = 24
 
const uint32_t GENERATION_BITS = 8
 
const uint32_t ID_MASK = (1<<ID_BITS) - 1
 
const uint32_t GENERATION_MASK = (1<<GENERATION_BITS) - 1
 

Typedef Documentation

◆ generation_t

typedef uint8_t generation_t

Variable Documentation

◆ GENERATION_BITS

const uint32_t GENERATION_BITS = 8

◆ GENERATION_MASK

const uint32_t GENERATION_MASK = (1<<GENERATION_BITS) - 1

◆ ID_BITS

const uint32_t ID_BITS = 24

◆ ID_MASK

const uint32_t ID_MASK = (1<<ID_BITS) - 1