#include <DurableTable.h>
Definition at line 150 of file DurableTable.h.
Public Member Functions | |
MultiTypeDurableTable (DurableTableImpl *impl, const std::string &name, DurableObjectCache< _BaseType > *cache) | |
Constructor. | |
int | put (const SerializableObject &key, TypeCollection::TypeCode_t type, const _BaseType *data, int flags) |
Update the value of the key, data pair in the database. | |
int | get (const SerializableObject &key, _BaseType **data, bool *from_cache=0) |
Get the data for key, possibly creating a new object of the given template type _Type (or some derivative), using the multitype collection specified by _Collection. | |
Static Public Member Functions | |
static int | new_object (TypeCollection::TypeCode_t typecode, SerializableObject **generic_object) |
Object allocation callback that is handed to the implementation to allow it to properly create an object once it extracts the type code. | |
Private Member Functions | |
MultiTypeDurableTable (const MultiTypeDurableTable &) |
MultiTypeDurableTable< _BaseType, _Collection >::MultiTypeDurableTable | ( | DurableTableImpl * | impl, | |
const std::string & | name, | |||
DurableObjectCache< _BaseType > * | cache | |||
) | [inline] |
MultiTypeDurableTable< _BaseType, _Collection >::MultiTypeDurableTable | ( | const MultiTypeDurableTable< _BaseType, _Collection > & | ) | [private] |
int MultiTypeDurableTable< _BaseType, _Collection >::put | ( | const SerializableObject & | key, | |
TypeCollection::TypeCode_t | type, | |||
const _BaseType * | data, | |||
int | flags | |||
) |
Update the value of the key, data pair in the database.
It should already exist.
key | Key object | |
type | Type code for the object | |
data | Data object | |
flags | Bit vector of DurableStoreFlags_t values. |
int MultiTypeDurableTable< _BaseType, _Collection >::get | ( | const SerializableObject & | key, | |
_BaseType ** | data, | |||
bool * | from_cache = 0 | |||
) |
Get the data for key, possibly creating a new object of the given template type _Type (or some derivative), using the multitype collection specified by _Collection.
_Type therefore must be a valid superclass for the object identified by the type code in the database.
key | Key object | |
data | Data object | |
from_cache | == true if the object retrieved from the cache |
static int MultiTypeDurableTable< _BaseType, _Collection >::new_object | ( | TypeCollection::TypeCode_t | typecode, | |
SerializableObject ** | generic_object | |||
) | [static] |
Object allocation callback that is handed to the implementation to allow it to properly create an object once it extracts the type code.