CHROMA
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
Chroma::SerialDBKey< K > Class Template Reference

Serializable key harness. More...

#include <key_val_db.h>

Inheritance diagram for Chroma::SerialDBKey< K >:

Public Member Functions

 SerialDBKey ()
 Default constructor. More...
 
 SerialDBKey (const K &k)
 Constructor from data. More...
 
Kkey ()
 Setter. More...
 
const Kkey () const
 Getter. More...
 
const unsigned short serialID (void) const
 
void writeObject (std::string &output) const throw (SerializeException)
 
void readObject (const std::string &input) throw (SerializeException)
 
int hasHashFunc (void) const
 
int hasCompareFunc (void) const
 

Static Public Member Functions

static unsigned int hash (const void *bytes, unsigned int len)
 
static int compare (const FFDB_DBT *k1, const FFDB_DBT *k2)
 

Private Attributes

K key_
 

Detailed Description

template<typename K>
class Chroma::SerialDBKey< K >

Serializable key harness.

Definition at line 20 of file key_val_db.h.

Constructor & Destructor Documentation

◆ SerialDBKey() [1/2]

template<typename K >
Chroma::SerialDBKey< K >::SerialDBKey ( )
inline

Default constructor.

Definition at line 24 of file key_val_db.h.

◆ SerialDBKey() [2/2]

template<typename K >
Chroma::SerialDBKey< K >::SerialDBKey ( const K k)
inline

Constructor from data.

Definition at line 27 of file key_val_db.h.

Member Function Documentation

◆ compare()

template<typename K >
static int Chroma::SerialDBKey< K >::compare ( const FFDB_DBT *  k1,
const FFDB_DBT *  k2 
)
inlinestatic

Definition at line 57 of file key_val_db.h.

◆ hasCompareFunc()

template<typename K >
int Chroma::SerialDBKey< K >::hasCompareFunc ( void  ) const
inline

Definition at line 51 of file key_val_db.h.

◆ hash()

template<typename K >
static unsigned int Chroma::SerialDBKey< K >::hash ( const void *  bytes,
unsigned int  len 
)
inlinestatic

Empty hash and compare functions. We are using default functions.

Definition at line 56 of file key_val_db.h.

◆ hasHashFunc()

template<typename K >
int Chroma::SerialDBKey< K >::hasHashFunc ( void  ) const
inline

Definition at line 50 of file key_val_db.h.

◆ key() [1/2]

template<typename K >
K& Chroma::SerialDBKey< K >::key ( )
inline

◆ key() [2/2]

template<typename K >
const K& Chroma::SerialDBKey< K >::key ( ) const
inline

Getter.

Definition at line 33 of file key_val_db.h.

◆ readObject()

template<typename K >
void Chroma::SerialDBKey< K >::readObject ( const std::string &  input)
throw (SerializeException
)
inline

Definition at line 44 of file key_val_db.h.

References Chroma::read().

◆ serialID()

template<typename K >
const unsigned short Chroma::SerialDBKey< K >::serialID ( void  ) const
inline

Definition at line 36 of file key_val_db.h.

◆ writeObject()

template<typename K >
void Chroma::SerialDBKey< K >::writeObject ( std::string &  output) const
throw (SerializeException
)
inline

Definition at line 38 of file key_val_db.h.

References Chroma::write().

Member Data Documentation

◆ key_

template<typename K >
K Chroma::SerialDBKey< K >::key_
private

Definition at line 60 of file key_val_db.h.


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