ttypt/idm.h(3)corm

NAME

ttypt/idm.h - ID and index management utilities for Corm.

SYNOPSIS

#include './queue.h'
#include <stddef.h>
#include <stdint.h>

Data Structures

struct ids_item

Node representing a stored integer ID.

struct idm_t

Index/ID manager with a free-list and counter.

Macros

#define IDM_MISS ((uint32_t)-1)

Value representing an invalid or missing ID.

Typedefs

typedef struct ids_item idsi_t

Node representing a stored integer ID.

Functions

void ids_push (ids_t *list, uint32_t id)

Push an ID into the free list.

uint32_t ids_pop (ids_t *list)

Pop an ID from the free list.

void ids_drop (ids_t *list)

Free all IDs in the list.

void ids_remove (ids_t *list, uint32_t id)

Remove a specific ID from the list.

void ids_free (ids_t *list, uint32_t id)

Free a specific ID node.

void idm_drop (idm_t *idm)

Drop all IDs managed by an ID manager.

uint32_t idm_push (idm_t *idm, uint32_t n)

Push IDs up to a given value.

int idm_del (idm_t *idm, uint32_t id)

Delete a specific ID from manager.

uint32_t idm_new (idm_t *idm)

Allocate a new unique ID.

Detailed Description

ID and index management utilities for Corm.

Provides linked-list–based tracking of reusable integer IDs and index allocation routines used internally by Corm.

License: BSD-2-Clause

Author

Generated automatically by Doxygen for corm from the source code.