OpenDaVINCI  4.15.3
odcore::wrapper::KeyValueDatabaseFactory Struct Reference

#include <KeyValueDatabaseFactory.h>

Static Public Member Functions

static std::shared_ptr
< KeyValueDatabase
createKeyValueDatabase ()
 

Detailed Description

Abstract factory for creating wrapped key/value databases:

It can be used as follows:

std::shared_ptr<KeyValueDatabase> kvdb;
try {
}
catch(string &s) {
clog << "Failed: " << s << endl;
}
if (kvdb != NULL) {
const string value = "ABCD";
const int32_t key = 123;
kvdb->put(key, value);
string retrievedValue = kvdb->get(key);
}

Member Function Documentation