Elektra  0.8.19

The private trie structure. More...

Collaboration diagram for Trie:
Backend * trieLookup (Trie *trie, const Key *key)
 Internal Datastructure for mountpoints. More...
 
int trieClose (Trie *trie, Key *errorKey)
 Closes the trie and all opened backends within. More...
 

Detailed Description

The private trie structure.

A trie is a data structure which can handle the longest prefix matching very fast. This is exactly what needs to be done when using kdbGet() and kdbSet() in a hierarchy where backends are mounted - you need the backend mounted closest to the parentKey.

Function Documentation

int trieClose ( Trie *  trie,
Key *  errorKey 
)

Closes the trie and all opened backends within.

Parameters
triethe trie to close
errorKeythe key used to report warnings
Return values
0on success
Backend* trieLookup ( Trie *  trie,
const Key *  key 
)

Internal Datastructure for mountpoints.

Lookups a backend inside the trie.

Returns
the backend if found
0 otherwise
Parameters
triethe trie object to work with
keythe name of this key will be looked up