OpenDaVINCI  4.16.0
odcore::wrapper::KeyValueDatabase Class Referenceabstract

#include <KeyValueDatabase.h>

Inheritance diagram for odcore::wrapper::KeyValueDatabase:
Inheritance graph

Public Member Functions

virtual ~KeyValueDatabase ()
virtual void put (const int32_t &key, const string &value)=0
virtual const string get (const int32_t &key) const =0

Detailed Description

This interface encapsulates all methods necessary to implement a key/value-database.


Constructor & Destructor Documentation

odcore::wrapper::KeyValueDatabase::~KeyValueDatabase ( )

Member Function Documentation

virtual const string odcore::wrapper::KeyValueDatabase::get ( const int32_t &  key) const
pure virtual

This method returns the value for a key. The value for a non-existing key is "".

keyThe key for which the value has to be returned.
The value.

Implemented in odcore::wrapper::SimpleDB::SimpleDB.

virtual void odcore::wrapper::KeyValueDatabase::put ( const int32_t &  key,
const string &  value 
pure virtual

This method puts a key/value pair into the database. An existing entry is substituted.

keyThe key.
valueThe value.

Implemented in odcore::wrapper::SimpleDB::SimpleDB.