dtn::PersistentStore Class Reference

#include <PersistentStore.h>

Inheritance diagram for dtn::PersistentStore:

dtn::SQLStore

List of all members.


Detailed Description

The abstract base class implementing a persistent storage system.

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 ()

Constructor & Destructor Documentation

virtual dtn::PersistentStore::~PersistentStore (  )  [virtual]


Member Function Documentation

virtual int dtn::PersistentStore::close (  )  [pure virtual]

Close and flush the store.

Implemented in dtn::SQLStore.

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]

Store the object with the given key.

Implemented in dtn::SQLStore.

virtual int dtn::PersistentStore::update ( oasys::SerializableObject *  obj,
const int  key 
) [pure virtual]

Update the object with the given key.

Implemented in dtn::SQLStore.

virtual int dtn::PersistentStore::del ( const int  key  )  [pure virtual]

Delete the object at the given key.

Implemented in dtn::SQLStore.

virtual int dtn::PersistentStore::num_elements (  )  [pure virtual]

Return the number of elements in the table.

Implemented in dtn::SQLStore.

virtual void dtn::PersistentStore::keys ( std::vector< int > *  v  )  [pure virtual]

Fill in the given vector with the keys currently stored in the table.

Implemented in dtn::SQLStore.


The documentation for this class was generated from the following file:

Generated on Mon Jul 21 14:12:22 2008 for DTN Reference Implementation by  doxygen 1.5.6