Welcome to little lamb

Code » limb » release » tree

[release] / src / doc / cdbmake.h / cdbmake.h.0.md

% limb manual
% cdbmake.h(0)
% limb 0.1.0
% 2023-07-24

# NAME

cdbmake.h - creating constant databases


# SYNOPSIS

    #include <limb/cdbmake.h>


# DESCRIPTION

The header defines the needed functions to create constant databases, known as
.cdb files.

<inc skalibs.md>

## Types

The following types are defined :

: *cdbmaker*
:: Opaque structure to be passed to the *cdbmaker_* family of functions below.

: *cdbmaker_sa*
:: Opaque structure to be passed to the *cdbmaker_sa_* family of functions below.

## Macros

The following macros are defined :

: *CDBMAKER_ZERO*
:: Value to initialize a *cdbmaker*.

: *CDBMAKER_SA_ZERO*
:: Value to initialize a *cdbmaker_sa*.

## Functions

The following functions/macros are defined :

: [cdbmaker_add](3)
:: Add an element into a *cdbmaker*.

: [cdbmaker_finish](3)
:: Finalize & write the cdb from a *cdbmaker*.

: [cdbmaker_start](3)
:: Prepare a *cdbmaker* to create a new cdb.

: [cdbmaker_sa_add](3)
:: Similar to [cdbmake_add](3) but the cdb will be created in-memory.

: [cdbmaker_sa_data](3)
:: To get a pointer to the in-memory cdb.

: [cdbmaker_sa_dlen](3)
:: To get the length of the in-memory cdb.

: [cdbmaker_sa_finish](3)
:: Similar to [cdbmake_finish](3) but the cdb will be created in-memory.

: [cdbmaker_sa_free](3)
:: To free memory associated with an opaque *cdbmaker_sa* when done.

: [cdbmaker_sa_init](3)
:: To initialize a *cdbmaker_sa* if not initialized through *CDBMAKER_SA_ZERO*.

: [cdbmaker_sa_start](3)
:: Similar to [cdbmake_start](3) but the cdb will be created in-memory.