|
Elektra 0.11.0
|
This class is a wrapper around the ElektraDiff C struct. More...
#include <elektradiff.hpp>
Public Member Functions | |
| ElektraDiff (ckdb::ElektraDiff *cdiff) | |
| Constructs a diff out of a C diff. | |
| ElektraDiff (ElektraDiff &other) | |
| Takes a reference of another diff. | |
| ElektraDiff (ElektraDiff const &other) | |
| Takes a reference of another diff. | |
| void | undo (KeySet &ks) |
| Undo the changes represented in this diff. | |
| void | operator++ (int) const |
| Increment the reference counter of a ElektraDiff object. | |
| void | operator++ () const |
| Increment the reference counter of a ElektraDiff object. | |
| void | operator-- (int) const |
| Decrement the reference counter of a ElektraDiff object. | |
| void | operator-- () const |
| Decrement the reference counter of a ElektraDiff object. | |
| ckdb::ElektraDiff * | getDiff () const |
| Passes out the raw diff pointer. | |
| ckdb::ElektraDiff * | operator* () const |
| Passes out the raw diff pointer. | |
| ElektraDiff & | operator= (const ElektraDiff &other) |
| Assign a diff. | |
| uint16_t | getReferenceCounter () const |
| Returns the reference counter of a ElektraDiff object. | |
| void | removeOther (std::string const &parentKeyName) |
| Removes all the keys from the diff that are NOT same or below the given parentkey. | |
| void | removeOther (const Key &parentKey) |
| Removes all the keys from the diff that are NOT same or below the given parentkey. | |
| void | removeSameOrBelow (std::string const &cutpointName) |
| Removes all keys from the diff that are same or below the given cutpoint. | |
| void | removeSameOrBelow (const Key &cutpoint) |
| Removes all keys from the diff that are same or below the given cutpoint. | |
| void | removeKey (std::string const &keyName) |
| Remove the given key from the diff. | |
| void | removeKey (const Key &key) |
| Remove the given key from the diff. | |
| ElektraDiff | cut (std::string const &cutpointName) |
Creates a new diff with all keys from original that are same or below cutpoint. | |
| ElektraDiff | cut (const Key &cutpoint) |
Creates a new diff with all keys from original that are same or below cutpoint. | |
| ElektraDiff | dup () const |
| Duplicate the given diff. | |
| bool | isEmpty () const |
| Determine whether the given diff is empty. | |
| KeySet | getAddedKeys () const |
| Get the added keys. | |
| KeySet | getModifiedKeys () const |
| Get the modified keys. | |
| KeySet | getRemovedKeys () const |
| Get the removed keys. | |
| KeySet | getAddedMetaKeys (std::string const &keyName) const |
| Get metakeys added to the specific keys. | |
| KeySet | getAddedMetaKeys (const Key &key) const |
| Get metakeys added to the specific keys. | |
| KeySet | getModifiedMetaKeys (std::string const &keyName) const |
| Get modified metakeys of the specific keys. | |
| KeySet | getModifiedMetaKeys (const Key &key) const |
| Get modified metakeys of the specific keys. | |
| KeySet | getRemovedMetaKeys (std::string const &keyName) const |
| Get metakeys removed from the specific keys. | |
| KeySet | getRemovedMetaKeys (const Key &key) const |
| Get metakeys removed from the specific keys. | |
Static Public Member Functions | |
| static ElektraDiff | calculateDiff (const KeySet &newKeys, const KeySet &oldKeys, const std::string &parentKeyName) |
Calculates the difference between the given keysets The diff will contain the keys that were added, modified and removed in newKeys. | |
| static ElektraDiff | calculateDiff (const KeySet &newKeys, const KeySet &oldKeys, const Key &parentKey) |
Calculates the difference between the given keysets The diff will contain the keys that were added, modified and removed in newKeys. | |
This class is a wrapper around the ElektraDiff C struct.
|
inlineexplicit |
Constructs a diff out of a C diff.
| cdiff | the diff to work with |
|
inline |
Takes a reference of another diff.
The diff will not be copied, but the reference counter will be increased.
| other | the diff to work with |
|
inline |
Takes a reference of another diff.
The diff will not be copied, but the reference counter will be increased.
| other | the diff to work with |
|
inlinestatic |
Calculates the difference between the given keysets The diff will contain the keys that were added, modified and removed in newKeys.
| newKeys | the new keyset |
| oldKeys | the old keyset |
| parentKey | only changes same or below this key will be calculated |
|
inlinestatic |
Calculates the difference between the given keysets The diff will contain the keys that were added, modified and removed in newKeys.
| newKeys | the new keyset |
| oldKeys | the old keyset |
| parentKeyName | only changes same or below this key will be calculated |
|
inline |
Creates a new diff with all keys from original that are same or below cutpoint.
The affected keys are removed from original
| original | the original diff |
| cutpoint | the cutpoint |
cutpoint, OR NULL if original is NULL OR NULL if cutpoint is NULL
|
inline |
Creates a new diff with all keys from original that are same or below cutpoint.
The affected keys are removed from original
| original | the original diff |
| cutpoint | the cutpoint |
cutpoint, OR NULL if original is NULL OR NULL if cutpoint is NULL
|
inline |
Duplicate the given diff.
| original | the diff to duplicate |
|
inline |
Get the added keys.
| ksd | the ElektraDiff |
NULL if ksd is NULL Get metakeys added to the specific keys.
| ksd | the ElektraDiff |
| key | the key of which you want to get added metadata |
NULL if ksd is NULL OR key is NULL OR ksd does not contain key.
|
inline |
Get metakeys added to the specific keys.
| ksd | the ElektraDiff |
| key | the key of which you want to get added metadata |
NULL if ksd is NULL OR key is NULL OR ksd does not contain key.
|
inline |
Passes out the raw diff pointer.
This pointer can be used to directly change the underlying diff object.
|
inline |
Get the modified keys.
This will return the old keys (pre modification).
| ksd | the ElektraDiff |
NULL if ksd is NULL Get modified metakeys of the specific keys.
| ksd | the ElektraDiff |
| key | the key of which you want to get modified metadata |
NULL if ksd is NULL OR key is NULL OR ksd does not contain key.
|
inline |
Get modified metakeys of the specific keys.
| ksd | the ElektraDiff |
| key | the key of which you want to get modified metadata |
NULL if ksd is NULL OR key is NULL OR ksd does not contain key.
|
inline |
Returns the reference counter of a ElektraDiff object.
| ksd | the ElektraDiff object whose reference counter should get returned |
| UINT16_MAX | on NULL pointer |
|
inline |
Get the removed keys.
| ksd | the ElektraDiff |
NULL if ksd is NULL Get metakeys removed from the specific keys.
| ksd | the ElektraDiff |
| key | the key of which you want to get removed metadata |
NULL if ksd is NULL OR key is NULL OR ksd does not contain key.
|
inline |
Get metakeys removed from the specific keys.
| ksd | the ElektraDiff |
| key | the key of which you want to get removed metadata |
NULL if ksd is NULL OR key is NULL OR ksd does not contain key.
|
inline |
Determine whether the given diff is empty.
| ksd | the diff |
true if diff is empty, false otherwise. Will also return true if ksd is NULL.
|
inline |
Passes out the raw diff pointer.
This pointer can be used to directly change the underlying diff object.
|
inline |
Increment the reference counter of a ElektraDiff object.
UINT16_MAX - 1. UINT16_MAX is reserved as an error code.ksd's reference counter is > 0 ksd's reference counter is <= UINT16_MAX - 1| ksd | the ElektraDiff object whose reference counter should be increased |
| UINT16_MAX | on NULL pointer |
| UINT16_MAX | when the reference counter already was the maximum value UINT16_MAX - 1, the reference counter will not be modified in this case |
|
inline |
Increment the reference counter of a ElektraDiff object.
UINT16_MAX - 1. UINT16_MAX is reserved as an error code.ksd's reference counter is > 0 ksd's reference counter is <= UINT16_MAX - 1| ksd | the ElektraDiff object whose reference counter should be increased |
| UINT16_MAX | on NULL pointer |
| UINT16_MAX | when the reference counter already was the maximum value UINT16_MAX - 1, the reference counter will not be modified in this case |
|
inline |
Decrement the reference counter of a ElektraDiff object.
ksd's reference counter is >= 0 ksd's reference counter is < UINT16_MAX - 1| ksd | the ElektraDiff object whose reference counter should get decreased |
| UINT16_MAX | on NULL pointer |
| 0 | when the reference counter already was the minimum value 0, the reference counter will not be modified in this case |
|
inline |
Decrement the reference counter of a ElektraDiff object.
ksd's reference counter is >= 0 ksd's reference counter is < UINT16_MAX - 1| ksd | the ElektraDiff object whose reference counter should get decreased |
| UINT16_MAX | on NULL pointer |
| 0 | when the reference counter already was the minimum value 0, the reference counter will not be modified in this case |
|
inline |
Assign a diff.
| other | the diff to assign |
|
inline |
Remove the given key from the diff.
| ksd | the diff |
| toRemove | the key to remove |
|
inline |
Remove the given key from the diff.
| ksd | the diff |
| toRemove | the key to remove |
|
inline |
Removes all the keys from the diff that are NOT same or below the given parentkey.
| ksd | the diff where the keys should be removed |
| parentKey | the parent key |
|
inline |
Removes all the keys from the diff that are NOT same or below the given parentkey.
| ksd | the diff where the keys should be removed |
| parentKey | the parent key |
|
inline |
Removes all keys from the diff that are same or below the given cutpoint.
| ksd | the diff where the keys should be removed |
| cutpoint | the cutpoint |
|
inline |
Removes all keys from the diff that are same or below the given cutpoint.
| ksd | the diff where the keys should be removed |
| cutpoint | the cutpoint |
|
inline |
Undo the changes represented in this diff.
| ks | the keyset where the changs should be undone |