oasys::SingleTypeDurableTable< _DataType > Class Template Reference

#include <DurableStore.h>

Inheritance diagram for oasys::SingleTypeDurableTable< _DataType >:

oasys::DurableTable< _Type > List of all members.

Detailed Description

template<typename _DataType>
class oasys::SingleTypeDurableTable< _DataType >

Class for a durable table that only stores one type of object, represented by the template parameter _DataType.

Definition at line 475 of file DurableStore.h.

Public Member Functions

 SingleTypeDurableTable (DurableTableImpl *impl, const std::string &name, DurableObjectCache< _DataType > *cache)
 Constructor.
int put (const SerializableObject &key, const _DataType *data, int flags)
 Update the value of the key, data pair in the database.
int get (const SerializableObject &key, _DataType **data, bool *from_cache=0)
 Get the data for key, possibly creating a new object of the template type _DataType.
int get_copy (const SerializableObject &key, _DataType *data)
 Get variant which can take a blank object down into the get function.

Private Member Functions

 SingleTypeDurableTable (const SingleTypeDurableTable &)


Constructor & Destructor Documentation

template<typename _DataType>
oasys::SingleTypeDurableTable< _DataType >::SingleTypeDurableTable ( DurableTableImpl impl,
const std::string &  name,
DurableObjectCache< _DataType > *  cache 
) [inline]

Constructor.

Definition at line 480 of file DurableStore.h.

template<typename _DataType>
oasys::SingleTypeDurableTable< _DataType >::SingleTypeDurableTable ( const SingleTypeDurableTable< _DataType > &   )  [private]


Member Function Documentation

template<typename _DataType>
int SingleTypeDurableTable< _DataType >::put ( const SerializableObject key,
const _DataType *  data,
int  flags 
) [inline]

Update the value of the key, data pair in the database.

It should already exist.

Parameters:
key Key object
data Data object
flags Bit vector of DurableStoreFlags_t values.
Returns:
DS_OK, DS_NOTFOUND, DS_ERR

Definition at line 1206 of file DurableStore.h.

template<typename _DataType>
int SingleTypeDurableTable< _DataType >::get ( const SerializableObject key,
_DataType **  data,
bool from_cache = 0 
) [inline]

Get the data for key, possibly creating a new object of the template type _DataType.

Note that the given type must match the actual type that was stored in the database, or this will return undefined garbage.

Parameters:
key Key object
data Data object
from_cache == true if the object retrieved from the cache
Returns:
DS_OK, DS_NOTFOUND if key is not found

Definition at line 1139 of file DurableStore.h.

template<typename _DataType>
int SingleTypeDurableTable< _DataType >::get_copy ( const SerializableObject key,
_DataType *  data 
) [inline]

Get variant which can take a blank object down into the get function.

Definition at line 1182 of file DurableStore.h.


The documentation for this class was generated from the following file:
Generated on Thu Jun 7 16:57:02 2007 for DTN Reference Implementation by  doxygen 1.5.1