This class is a wrapper around the ElektraDiff C struct.
More...
#include <elektradiff.hpp>
|
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 . More...
|
|
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 . More...
|
|
This class is a wrapper around the ElektraDiff C struct.
- Invariant
- always holds an underlying ElektraDiff C object.
◆ ElektraDiff() [1/3]
kdb::ElektraDiff::ElektraDiff |
( |
ckdb::ElektraDiff * |
cdiff | ) |
|
|
inlineexplicit |
Constructs a diff out of a C diff.
- Parameters
-
cdiff | the diff to work with |
◆ ElektraDiff() [2/3]
Takes a reference of another diff.
The diff will not be copied, but the reference counter will be increased.
- Parameters
-
other | the diff to work with |
◆ ElektraDiff() [3/3]
kdb::ElektraDiff::ElektraDiff |
( |
ElektraDiff const & |
other | ) |
|
|
inline |
Takes a reference of another diff.
The diff will not be copied, but the reference counter will be increased.
- Parameters
-
other | the diff to work with |
◆ calculateDiff() [1/2]
Calculates the difference between the given keysets The diff will contain the keys that were added, modified and removed in newKeys
.
- Parameters
-
newKeys | the new keyset |
oldKeys | the old keyset |
parentKey | only changes same or below this key will be calculated |
- Returns
- diff of the two given keysets
◆ calculateDiff() [2/2]
ElektraDiff kdb::ElektraDiff::calculateDiff |
( |
const KeySet & |
newKeys, |
|
|
const KeySet & |
oldKeys, |
|
|
const std::string & |
parentKeyName |
|
) |
| |
|
inlinestatic |
Calculates the difference between the given keysets The diff will contain the keys that were added, modified and removed in newKeys
.
- Parameters
-
newKeys | the new keyset |
oldKeys | the old keyset |
parentKeyName | only changes same or below this key will be calculated |
- Returns
- diff of the two given keysets
◆ cut() [1/2]
◆ cut() [2/2]
ElektraDiff kdb::ElektraDiff::cut |
( |
std::string const & |
cutpointName | ) |
|
|
inline |
◆ dup()
◆ getAddedKeys()
KeySet kdb::ElektraDiff::getAddedKeys |
( |
| ) |
const |
|
inline |
◆ getAddedMetaKeys() [1/2]
KeySet kdb::ElektraDiff::getAddedMetaKeys |
( |
const Key & |
key | ) |
const |
|
inline |
◆ getAddedMetaKeys() [2/2]
KeySet kdb::ElektraDiff::getAddedMetaKeys |
( |
std::string const & |
keyName | ) |
const |
|
inline |
◆ getDiff()
ckdb::ElektraDiff * kdb::ElektraDiff::getDiff |
( |
| ) |
const |
|
inline |
Passes out the raw diff pointer.
This pointer can be used to directly change the underlying diff object.
- Note
- that the ownership remains in the object
◆ getModifiedKeys()
KeySet kdb::ElektraDiff::getModifiedKeys |
( |
| ) |
const |
|
inline |
◆ getModifiedMetaKeys() [1/2]
KeySet kdb::ElektraDiff::getModifiedMetaKeys |
( |
const Key & |
key | ) |
const |
|
inline |
◆ getModifiedMetaKeys() [2/2]
KeySet kdb::ElektraDiff::getModifiedMetaKeys |
( |
std::string const & |
keyName | ) |
const |
|
inline |
◆ getReferenceCounter()
uint16_t kdb::ElektraDiff::getReferenceCounter |
( |
| ) |
const |
|
inline |
◆ getRemovedKeys()
KeySet kdb::ElektraDiff::getRemovedKeys |
( |
| ) |
const |
|
inline |
◆ getRemovedMetaKeys() [1/2]
KeySet kdb::ElektraDiff::getRemovedMetaKeys |
( |
const Key & |
key | ) |
const |
|
inline |
◆ getRemovedMetaKeys() [2/2]
KeySet kdb::ElektraDiff::getRemovedMetaKeys |
( |
std::string const & |
keyName | ) |
const |
|
inline |
◆ isEmpty()
bool kdb::ElektraDiff::isEmpty |
( |
| ) |
const |
|
inline |
◆ operator*()
ckdb::ElektraDiff * kdb::ElektraDiff::operator* |
( |
| ) |
const |
|
inline |
Passes out the raw diff pointer.
This pointer can be used to directly change the underlying diff object.
- Note
- that the ownership remains in the object
◆ operator++() [1/2]
void kdb::ElektraDiff::operator++ |
( |
| ) |
const |
|
inline |
◆ operator++() [2/2]
void kdb::ElektraDiff::operator++ |
( |
int |
| ) |
const |
|
inline |
◆ operator--() [1/2]
void kdb::ElektraDiff::operator-- |
( |
| ) |
const |
|
inline |
◆ operator--() [2/2]
void kdb::ElektraDiff::operator-- |
( |
int |
| ) |
const |
|
inline |
◆ operator=()
Assign a diff.
- Parameters
-
- Returns
- reference to this
◆ removeKey() [1/2]
void kdb::ElektraDiff::removeKey |
( |
const Key & |
key | ) |
|
|
inline |
◆ removeKey() [2/2]
void kdb::ElektraDiff::removeKey |
( |
std::string const & |
keyName | ) |
|
|
inline |
◆ removeOther() [1/2]
void kdb::ElektraDiff::removeOther |
( |
const Key & |
parentKey | ) |
|
|
inline |
◆ removeOther() [2/2]
void kdb::ElektraDiff::removeOther |
( |
std::string const & |
parentKeyName | ) |
|
|
inline |
◆ removeSameOrBelow() [1/2]
void kdb::ElektraDiff::removeSameOrBelow |
( |
const Key & |
cutpoint | ) |
|
|
inline |
◆ removeSameOrBelow() [2/2]
void kdb::ElektraDiff::removeSameOrBelow |
( |
std::string const & |
cutpointName | ) |
|
|
inline |
◆ undo()
void kdb::ElektraDiff::undo |
( |
KeySet & |
ks | ) |
|
|
inline |
Undo the changes represented in this diff.
- Parameters
-
ks | the keyset where the changs should be undone |
The documentation for this class was generated from the following file: