|
Elektra
0.8.14
|
#include <key.hpp>
Public Member Functions | |
| Key () | |
| Constructs an empty, invalid key. More... | |
| Key (ckdb::Key *k) | |
| Constructs a key out of a C key. More... | |
| Key (Key &k) | |
| Takes a reference of another key. More... | |
| Key (Key const &k) | |
| Takes a reference of another key. More... | |
| Key (const char *keyName,...) | |
| Key (const std::string keyName,...) | |
| Key (const char *keyName, va_list ap) | |
| void | operator++ (int) const |
| void | operator++ () const |
| void | operator-- (int) const |
| void | operator-- () const |
| ssize_t | getReferenceCounter () const |
| Key & | operator= (ckdb::Key *k) |
| Assign a C key. More... | |
| Key & | operator= (const Key &k) |
| Assign a key. More... | |
| void | copy (const Key &other) |
| void | clear () |
| Clears/Invalidates a key. More... | |
| Key * | operator-> () |
| ckdb::Key * | getKey () const |
| Passes out the raw key pointer. More... | |
| ckdb::Key * | operator* () const |
| Is a abbreviation for getKey. More... | |
| ckdb::Key * | release () |
| Passes out the raw key pointer and resets internal key handle. More... | |
| ckdb::Key * | dup () const |
| ~Key () | |
| Destructs the key. More... | |
| std::string | getName () const |
| ssize_t | getNameSize () const |
| std::string | getBaseName () const |
| ssize_t | getBaseNameSize () const |
| void | setName (const std::string &newName) |
| void | setBaseName (const std::string &baseName) |
| Sets a base name for a key. More... | |
| void | addBaseName (const std::string &baseName) |
| Adds a base name for a key. More... | |
| ssize_t | getFullNameSize () const |
| std::string | getFullName () const |
| bool | operator== (const Key &k) const |
| bool | operator!= (const Key &k) const |
| bool | operator< (const Key &other) const |
| bool | operator<= (const Key &other) const |
| bool | operator> (const Key &other) const |
| bool | operator>= (const Key &other) const |
| bool | isNull () const |
| Checks if C++ wrapper has an underlying key. More... | |
| operator bool () const | |
| This is for loops and lookups only. More... | |
| bool | needSync () const |
| template<class T > | |
| T | get () const |
| Get a key value. More... | |
| template<class T > | |
| void | set (T x) |
| Set a key value. More... | |
| std::string | getString () const |
| void | setString (std::string newString) |
| ssize_t | getStringSize () const |
| func_t | getFunc () const |
| Elektra can store function pointers as binary. More... | |
| const void * | getValue () const |
| std::string | getBinary () const |
| ssize_t | getBinarySize () const |
| ssize_t | setBinary (const void *newBinary, size_t dataSize) |
| bool | hasMeta (const std::string &metaName) const |
| template<class T > | |
| T | getMeta (const std::string &metaName) const |
| template<class T > | |
| void | setMeta (const std::string &metaName, T x) |
| Set metadata for key. More... | |
| void | delMeta (const std::string &metaName) |
| Delete metadata for key. More... | |
| void | copyMeta (const Key &other, const std::string &metaName) |
| void | copyAllMeta (const Key &other) |
| void | rewindMeta () const |
| const Key | nextMeta () |
| const Key | currentMeta () const |
| bool | isValid () const |
| std::string | getNamespace () const |
| bool | isSystem () const |
| Name starts with "system". More... | |
| bool | isUser () const |
| Name starts with "user". More... | |
| bool | isString () const |
| bool | isBinary () const |
| bool | isInactive () const |
| bool | isBelow (const Key &k) const |
| bool | isBelowOrSame (const Key &k) const |
| bool | isDirectBelow (const Key &k) const |
This class is an wrapper for an optional, refcounted ckdb::Key. It is like an shared_ptr<ckdb::Key>, but the shared_ptr functionality is already within the Key and exposed with this wrapper.
|
inline |
|
inline |
|
inline |
Takes a reference of another key.
The key will not be copied, but the reference counter will be increased.
| k | the key to work with |
|
inline |
Takes a reference of another key.
The key will not be copied, but the reference counter will be increased.
| k | the key to work with |
|
inlineexplicit |
| bad_alloc | if key could not be constructed (allocation problems) |
| keyName | the name of the new key |
|
inlineexplicit |
| bad_alloc | if key could not be constructed (allocation problems) |
| keyName | the name of the new key |
|
inlineexplicit |
| bad_alloc | if key could not be constructed (allocation problems) |
| keyName | the name of the new key |
| ap | the variable argument list pointer |
|
inline |
Destructs the key.
|
inline |
Adds a base name for a key.
| KeyInvalidName | if the name is not valid |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Delete metadata for key.
|
inline |
|
inline |
Get a key value.
You can write your own template specialication, e.g.:
It should be the same as get().
| KeyException | on null key or not a valid size |
| KeyTypeMismatch | if key holds binary data and not a string |
This method tries to serialise the string to the given type.
|
inline |
|
inline |
|
inline |
| "" | on null pointers (size == 0) and on data only containing \0 |
| KeyException | on invalid binary size |
| KeyTypeMismatch | if key is string and not a binary |
|
inline |
|
inline |
| KeyException | if key is null |
|
inline |
|
inline |
Elektra can store function pointers as binary.
This function returns such a function pointer.
| KeyTypeMismatch | if no binary data found, or binary data has not correct length |
|
inline |
Passes out the raw key pointer.
This pointer can be used to directly change the underlying key object.
|
inline |
You can specify your own template specialisation:
| KeyTypeConversion | if meta data could not be parsed |
If no meta is available:
|
inline |
| KeyException | if key is null |
|
inline |
|
inline |
Will return slash for cascading names.
|
inline |
|
inline |
It should be the same as get().
| KeyException | on null key or not a valid size |
| KeyTypeMismatch | if key holds binary data and not a string |
|
inline |
|
inline |
|
inline |
| true | if there is a metadata with given name |
| false | if no such metadata exists |
|
inline |
| k | the other key |
|
inline |
| k | the other key |
|
inline |
|
inline |
| k | the other key |
|
inline |
|
inline |
Checks if C++ wrapper has an underlying key.
|
inline |
|
inline |
Name starts with "system".
| true | if it is a system key |
| false | otherwise |
|
inline |
Name starts with "user".
| true | if it is a user key |
| false | otherwise |
|
inline |
An invalid key has no name. The name of valid keys either start with user or system.
| true | if the key has a valid name |
| false | if the key has an invalid name |
|
inline |
|
inline |
|
inline |
|
inline |
| true | != 0 |
|
inline |
Is a abbreviation for getKey.
Passes out the raw key pointer. This pointer can be used to directly change the underlying key object.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| true | < 0 |
|
inline |
| true | <= 0 |
|
inline |
Assign a C key.
Will call del() on the old key.
|
inline |
| true | == 0 |
|
inline |
| true | > 0 |
|
inline |
| true | >= 0 |
|
inline |
Passes out the raw key pointer and resets internal key handle.
| 0 | if no key is held (null pointer), no action is done then. |
|
inline |
|
inline |
Set a key value.
This method tries to deserialise the string to the given type.
|
inline |
Sets a base name for a key.
| KeyInvalidName | if the name is not valid |
|
inline |
|
inline |
Set metadata for key.
Use delMeta() to avoid these issues.
|
inline |
| KeyInvalidName | if the name is not valid |
|
inline |
1.8.10