#include <PersistentStore.h>
Inheritance diagram for dtn::PersistentStore:
Specific implementations (i.e. Berkeley DB or SQL) should derive from this class.
TODO: * should the key be an int or a std::string?
Definition at line 34 of file PersistentStore.h.
Public Member Functions | |
virtual int | close ()=0 |
Close and flush the store. | |
virtual int | get (oasys::SerializableObject *obj, const int key)=0 |
Fill in the fields of the object referred to by *obj with the value stored at the given key. | |
virtual int | add (oasys::SerializableObject *obj, const int key)=0 |
Store the object with the given key. | |
virtual int | update (oasys::SerializableObject *obj, const int key)=0 |
Update the object with the given key. | |
virtual int | del (const int key)=0 |
Delete the object at the given key. | |
virtual int | num_elements ()=0 |
Return the number of elements in the table. | |
virtual void | keys (std::vector< int > *v)=0 |
Fill in the given vector with the keys currently stored in the table. | |
virtual | ~PersistentStore () |
virtual dtn::PersistentStore::~PersistentStore | ( | ) | [virtual] |
virtual int dtn::PersistentStore::close | ( | ) | [pure virtual] |
virtual int dtn::PersistentStore::get | ( | oasys::SerializableObject * | obj, | |
const int | key | |||
) | [pure virtual] |
Fill in the fields of the object referred to by *obj with the value stored at the given key.
Implemented in dtn::SQLStore.
virtual int dtn::PersistentStore::add | ( | oasys::SerializableObject * | obj, | |
const int | key | |||
) | [pure virtual] |
virtual int dtn::PersistentStore::update | ( | oasys::SerializableObject * | obj, | |
const int | key | |||
) | [pure virtual] |
virtual int dtn::PersistentStore::del | ( | const int | key | ) | [pure virtual] |
virtual int dtn::PersistentStore::num_elements | ( | ) | [pure virtual] |
virtual void dtn::PersistentStore::keys | ( | std::vector< int > * | v | ) | [pure virtual] |