Elektra  0.9.5
Functions
keyset.c File Reference

Methods for key sets. More...

#include "kdbprivate.h"
#include <kdb.h>
#include <kdbtypes.h>
#include "kdbinternal.h"
#include <kdbassert.h>
#include <kdbrand.h>
Include dependency graph for keyset.c:

Functions

KeySet * ksNew (size_t alloc,...)
 Allocate, initialize and return a new KeySet object. More...
 
KeySet * ksVNew (size_t alloc, va_list va)
 Allocate, initialize and return a new KeySet object. More...
 
KeySet * ksDup (const KeySet *source)
 Return a duplicate of a keyset. More...
 
int ksCopy (KeySet *dest, const KeySet *source)
 Replace the content of a keyset with another one. More...
 
int ksDel (KeySet *ks)
 A destructor for KeySet objects. More...
 
int keyCmp (const Key *k1, const Key *k2)
 Compare the name of two keys. More...
 
int ksNeedSync (const KeySet *ks)
 Checks if KeySet needs sync. More...
 
ssize_t ksGetSize (const KeySet *ks)
 Return the number of keys that ks contains. More...
 
ssize_t ksAppendKey (KeySet *ks, Key *toAppend)
 Appends a Key to the end of ks. More...
 
ssize_t ksAppend (KeySet *ks, const KeySet *toAppend)
 Append all toAppend contained keys to the end of the ks. More...
 
ssize_t ksRename (KeySet *ks, const Key *root, const Key *newRoot)
 Moves all keys below root to below newRoot. More...
 
elektraCursor ksFindHierarchy (const KeySet *ks, const Key *root, elektraCursor *end)
 Searches for the start and optionally end of the key hierachy rooted at root in ks. More...
 
KeySet * ksCut (KeySet *ks, const Key *cutpoint)
 Cuts out a keyset at the cutpoint. More...
 
Key * ksPop (KeySet *ks)
 Remove and return the last key of ks. More...
 
int ksRewind (KeySet *ks)
 Rewinds the KeySet internal cursor. More...
 
Key * ksNext (KeySet *ks)
 Returns the next Key in a KeySet. More...
 
Key * ksCurrent (const KeySet *ks)
 Return the current Key. More...
 
Key * ksHead (const KeySet *ks)
 Return the first key in the KeySet. More...
 
Key * ksTail (const KeySet *ks)
 Return the last key in the KeySet. More...
 
elektraCursor ksGetCursor (const KeySet *ks)
 Get the KeySet internal cursor. More...
 
Key * ksAtCursor (KeySet *ks, elektraCursor pos)
 return key at given position More...
 
int ksSetCursor (KeySet *ks, elektraCursor cursor)
 Set the KeySet internal cursor. More...
 
Key * ksLookup (KeySet *ks, Key *key, elektraLookupFlags options)
 Look for a Key contained in ks that matches the name of the key. More...
 
Key * ksLookupByName (KeySet *ks, const char *name, elektraLookupFlags options)
 Convenience method to look for a Key contained in ks that matches name. More...
 

Detailed Description

Methods for key sets.