Elektra 0.8.26
trie.c File Reference

Interna of trie functionality. More...

#include "kdbinternal.h"
Include dependency graph for trie.c:

Functions

Backend * trieLookup (Trie *trie, const Key *key)
 The Trie structure.
int trieClose (Trie *trie, Key *errorKey)
 Closes the trie and all opened backends within.
Trie * trieInsert (Trie *trie, const char *name, Backend *value)
 Insert into trie.

Detailed Description

Interna of trie functionality.

Function Documentation

◆ trieClose()

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

◆ trieInsert()

Trie * trieInsert ( Trie * trie,
const char * name,
Backend * value )

Insert into trie.

Parameters
triethe trie to insert to (0 to create a new trie)
namethe key's name to insert
valuethe value to insert
Return values
trieon success

◆ trieLookup()

Backend * trieLookup ( Trie * trie,
const Key * key )

The Trie structure.

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