pl-nk v0.4.5
Plonk|Plink|Plank are a set of cross-platform C/C++ frameworks for audio software development
Functions
Plank SimpleMap class
Plank classes

A simple map. More...

Functions

PlankResult pl_SimpleMap_ContainsKey (PlankSimpleMapRef p, const PlankLL key, PlankB *flag)
 Determines whether the map already contains a specified key.
PlankResult pl_SimpleMap_SetKey (PlankSimpleMapRef p, const PlankLL key, PlankP data)
 Sets a key to associate with a pointer.
PlankResult pl_SimpleMap_GetKey (PlankSimpleMapRef p, const PlankLL key, PlankP *data)
 Get a pointer associated with the specified key.
PlankResult pl_SimpleMap_RemoveKey (PlankSimpleMapRef p, const PlankLL key, PlankP *data)
 Get a pointer associated with the specified key and remove it from the map.

Detailed Description

A simple map.

A simple queue.

Data elements are stored against 64-bit integer keys.


Function Documentation

PlankResult pl_SimpleMap_ContainsKey ( PlankSimpleMapRef  p,
const PlankLL  key,
PlankB *  flag 
)

Determines whether the map already contains a specified key.

Parameters:
pThe map object.
keyThe key to use.
flagOn return will contain if the map contains the specified key.
Returns:
PlankResult_OK if the operation was successful.
PlankResult pl_SimpleMap_GetKey ( PlankSimpleMapRef  p,
const PlankLL  key,
PlankP *  data 
)

Get a pointer associated with the specified key.

Parameters:
pThe map object.
keyThe key to use.
dataOn return will contain the pointer associated with the key (or PLANK_NULL if the map doesn't contain the key.
Returns:
PlankResult_OK if the operation was successful.
PlankResult pl_SimpleMap_RemoveKey ( PlankSimpleMapRef  p,
const PlankLL  key,
PlankP *  data 
)

Get a pointer associated with the specified key and remove it from the map.

Parameters:
pThe map object.
keyThe key to use.
dataOn return will contain the pointer associated with the key (or PLANK_NULL if the map doesn't contain the key. It is the caller's resposibility to free this pointer if necessary.
Returns:
PlankResult_OK if the operation was successful.
PlankResult pl_SimpleMap_SetKey ( PlankSimpleMapRef  p,
const PlankLL  key,
PlankP  data 
)

Sets a key to associate with a pointer.

If a pointer is already associated with the key and the free function has been set (with pl_SimpleMap_SetFreeElementDataFunction()) then the old pointer will be deallocated before setting the new one.

Parameters:
pThe map object.
keyThe key to use.
dataThe pointer to asscoiate with the key (map be PLANK_NULL).
Returns:
PlankResult_OK if the operation was successful.
 All Classes Functions Typedefs Enumerations Enumerator Properties