Functions | |
int | ksInit (KeySet *ks) |
int | ksClose (KeySet *ks) |
Key * | ksNext (KeySet *ks) |
int | ksRewind (KeySet *ks) |
Key * | ksCurrent (const KeySet *ks) |
size_t | ksInsert (KeySet *ks, Key *toInsert) |
size_t | ksInsertKeys (KeySet *ks, KeySet *toInsert) |
size_t | ksAppend (KeySet *ks, Key *toAppend) |
size_t | ksAppendKeys (KeySet *ks, KeySet *toAppend) |
int | ksCompare (KeySet *ks1, KeySet *ks2, KeySet *removed) |
size_t | ksToStream (const KeySet *ks, FILE *stream, unsigned long options) |
These are the methods to make various manipulations in the objects of class KeySet. Methods for sorting, merging, comparing, and internal cursor manipulation are provided. To use it:
#include <kdb.h>
|
Append a new Key to the end of the KeySet. The KeySet internal cursor is not moved.
Definition at line 2336 of file key.c. Referenced by commandEdit(), commandList(), kdbGetChildKeys(), kdbGetRootKeys(), and ksCompare(). |
|
Transfers an entire KeySet to the end of the KeySet. After this call, the toAppend KeySet will be empty.
Definition at line 2359 of file key.c. Referenced by commandList(), kdbGetChildKeys(), and ksCompare(). |
|
KeySet destructor. The keyClose() destructor will be called for all contained keys, and then freed. Then all internal KeySet pointers etc cleaned too. Sets the object ready to be freed by you.
Definition at line 2202 of file key.c. References keyClose(). Referenced by commandList(). |
|
Compare 2 KeySets with the following behavior:
In the end, After ksCompare(), you should:
Definition at line 2411 of file key.c. References KEY_FLAG_HASDOMAIN, KEY_FLAG_HASKEY, keyClose(), keyCompare(), ksAppend(), and ksAppendKeys(). Referenced by commandEdit(). |
|
Return the current Key
Definition at line 2266 of file key.c. Referenced by kdbMonitorKeys(). |
|
KeySet object constructor. Every KeySet object that will be used must be initialized first, to setup pointers, counters, etc. Definition at line 2184 of file key.c. Referenced by commandEdit(), commandImport(), commandList(), and kdbGetChildKeys(). |
|
Insert a new Key in the begining of the KeySet. The KeySet internal cursor is not moved.
Definition at line 2285 of file key.c. Referenced by kdbGetRootKeys(). |
|
Transfers an entire KeySet to the begining of the KeySet. After this call, the toInsert KeySet will be empty.
|
|
Returns the next Key in a KeySet. KeySets have an internal cursor that can be reset with ksRewind(). Every time ksNext() is called the cursor is incremented and the new current Key is returned. You'll get a NULL pointer if the end of KeySet was reached. After that, if ksNext() is called again, it will set the cursor to the begining of the KeySet and the first key is returned.
Definition at line 2232 of file key.c. Referenced by commandEdit(), commandList(), and kdbMonitorKeys(). |
|
Resets a KeySet internal cursor. Use it to set the cursor to the begining of the KeySet
Definition at line 2251 of file key.c. Referenced by commandEdit(), and commandList(). |
|
Prints an XML version of a KeySet object. Accepted options:
Definition at line 2509 of file key.c. References KDB_O_XMLHEADERS, and keyToStream(). Referenced by commandEdit(), and commandList(). |