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.
kdb::ElektraDiff::ElektraDiff |
( |
ckdb::ElektraDiff * |
cdiff | ) |
|
|
inlineexplicit |
Constructs a diff out of a C diff.
- Parameters
-
cdiff | the diff to work with |
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 |
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 |
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
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
ElektraDiff kdb::ElektraDiff::cut |
( |
std::string const & |
cutpointName | ) |
|
|
inline |
KeySet kdb::ElektraDiff::getAddedKeys |
( |
| ) |
const |
|
inline |
KeySet kdb::ElektraDiff::getAddedMetaKeys |
( |
std::string const & |
keyName | ) |
const |
|
inline |
KeySet kdb::ElektraDiff::getAddedMetaKeys |
( |
const Key & |
key | ) |
const |
|
inline |
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
KeySet kdb::ElektraDiff::getModifiedKeys |
( |
| ) |
const |
|
inline |
KeySet kdb::ElektraDiff::getModifiedMetaKeys |
( |
std::string const & |
keyName | ) |
const |
|
inline |
KeySet kdb::ElektraDiff::getModifiedMetaKeys |
( |
const Key & |
key | ) |
const |
|
inline |
uint16_t kdb::ElektraDiff::getReferenceCounter |
( |
| ) |
const |
|
inline |
KeySet kdb::ElektraDiff::getRemovedKeys |
( |
| ) |
const |
|
inline |
KeySet kdb::ElektraDiff::getRemovedMetaKeys |
( |
std::string const & |
keyName | ) |
const |
|
inline |
KeySet kdb::ElektraDiff::getRemovedMetaKeys |
( |
const Key & |
key | ) |
const |
|
inline |
bool kdb::ElektraDiff::isEmpty |
( |
| ) |
const |
|
inline |
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
void kdb::ElektraDiff::operator++ |
( |
int |
| ) |
const |
|
inline |
void kdb::ElektraDiff::operator++ |
( |
| ) |
const |
|
inline |
void kdb::ElektraDiff::operator-- |
( |
int |
| ) |
const |
|
inline |
void kdb::ElektraDiff::operator-- |
( |
| ) |
const |
|
inline |
Assign a diff.
- Parameters
-
- Returns
- reference to this
void kdb::ElektraDiff::removeKey |
( |
std::string const & |
keyName | ) |
|
|
inline |
void kdb::ElektraDiff::removeKey |
( |
const Key & |
key | ) |
|
|
inline |
void kdb::ElektraDiff::removeOther |
( |
std::string const & |
parentKeyName | ) |
|
|
inline |
void kdb::ElektraDiff::removeOther |
( |
const Key & |
parentKey | ) |
|
|
inline |
void kdb::ElektraDiff::removeSameOrBelow |
( |
std::string const & |
cutpointName | ) |
|
|
inline |
void kdb::ElektraDiff::removeSameOrBelow |
( |
const Key & |
cutpoint | ) |
|
|
inline |
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: