$darkmode
Elektra 0.11.0
|
Provides a merging wrapper around a KDB instance. More...
#include <mergingkdb.hpp>
Public Member Functions | |
int | get (KeySet &returned, std::string const &keyname) override |
Behaves like the KDB get function. More... | |
int | get (KeySet &returned, Key &parentKey) override |
Behaves like the KDB get function. More... | |
virtual int | synchronize (KeySet &returned, std::string const &keyname, ThreeWayMerge &merger) |
Synchronizes the file with the supplied KeySet. More... | |
virtual int | synchronize (KeySet &returned, Key &parentKey, ThreeWayMerge &merger) |
If a conflict occurs during set, the supplied merger is used to resolve the conflict. More... | |
Public Member Functions inherited from kdb::KDB | |
KDB () | |
Constructs a class KDB. More... | |
KDB (Key &errorKey) | |
Constructs a class KDB. More... | |
KDB (KeySet &contract) | |
Constructs a class KDB. More... | |
KDB (KeySet &contract, Key &errorKey) | |
Constructs a class KDB. More... | |
virtual void | open (Key &errorKey) |
Open the database. More... | |
virtual void | open (KeySet &contract, Key &errorKey) |
Open the database. More... | |
virtual void | close () throw () |
Close the database. More... | |
virtual void | close (Key &errorKey) throw () |
Close the database. More... | |
virtual int | set (KeySet &returned, std::string const &keyname) |
Set all keys below keyname. More... | |
virtual int | set (KeySet &returned, Key &parentKey) |
Set all keys below parentKey. More... | |
virtual ElektraDiff | calculateChanges (KeySet &changedKeySet, std::string const &parentKeyName) |
Calculates the changes between the provided KeySet and the current state of the KDB. More... | |
virtual ElektraDiff | calculateChanges (KeySet &changedKeySet, Key &parentKey) |
Calculates the changes between the provided KeySet and the current state of the KDB. More... | |
ckdb::KDB * | getKdb () const |
Passes out the raw kdb pointer. More... | |
ckdb::KDB * | operator* () const |
Is an abbreviation for getKdb. More... | |
Provides a merging wrapper around a KDB instance.
The wrapper allows to pass a three way merger instance that is used to resolve conflicts during KDB set.
|
overridevirtual |
|
virtual |
If a conflict occurs during set, the supplied merger is used to resolve the conflict.
If the conflict cannot be solved, an exception is thrown. If the KeySet was successfully written (either by merging or due the absence of a conflict) the supplied KeySet is updated with the new content of the file.
MergingKDBException |
|
virtual |
Synchronizes the file with the supplied KeySet.
If a conflict occurs during set, the supplied merger is used to resolve the conflict. If the conflict cannot be solved, an exception is thrown. If the KeySet was successfully written (either by merging or due the absence of a conflict) the supplied KeySet is updated with the new content of the file.
MergingKDBException |