Elektra  0.8.20
Functions
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. More...
 
int trieClose (Trie *trie, Key *errorKey)
 Closes the trie and all opened backends within. More...
 
Trie * trieInsert (Trie *trie, const char *name, Backend *value)
 Insert into trie. More...
 

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