libmoost
moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal > Class Template Reference

Provides a nice user friendly adaptor for an ikvds interface. More...

#include <kvds.hpp>

List of all members.

Classes

class  Iow

Public Types

typedef keyT key_type
typedef valT val_type
typedef std::vector< val_typekvds_values_t
typedef std::pair< key_type,
val_type
value_type
 Some syntactic suger to make this more STL like.
typedef val_type data_type

Public Member Functions

 Kvds (ikvds_ptr_t ikvds_ptr)
bool put (kvds_key_const_t const &key, kvds_val_const_t const &val) const
bool put (kvds_key_const_t const &key, kvds_values_t const &vals) const
bool get (kvds_key_const_t const &key, kvds_val_t val) const
bool get (kvds_key_const_t const &key, kvds_values_t &vals, size_t const count) const
bool get (kvds_key_const_t const &key, kvds_values_t &vals) const
bool insert (value_type const &kvp)
bool add (kvds_key_const_t const &key, kvds_val_const_t const &val) const
bool exists (kvds_key_const_t const &key) const
bool erase (kvds_key_const_t const &key) const
bool clear () const
bool size (kvds_key_const_t const &key, size_t &size) const
size_t size (kvds_key_const_t const &key) const
bool count (boost::uint64_t &cnt) const
boost::uint64_t size () const
bool empty () const
IKvds & get_ikvds () const
 Just in case you need access to the low level interface, but why would you?
ikvds_ptr_t get_ikvds_ptr () const
Iow operator[] (kvds_key_const_t const &key)

Private Types

typedef KvdsTypeKey< key_typekvds_key_t
typedef KvdsTypeVal< val_typekvds_val_t
typedef KvdsTypeKey< key_type
const > 
kvds_key_const_t
typedef KvdsTypeVal< val_type
const > 
kvds_val_const_t

Private Attributes

ikvds_ptr_t ikvds_ptr_

Friends

class KvdsKeyIterator

Detailed Description

template<typename keyT, typename valT, template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
class moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >

Provides a nice user friendly adaptor for an ikvds interface.

Kvds can support any type for serialisation and deserialisation, but it requires a template template for KvdsTypeKey and KvdsTypeVal to handle the generic interface for conversion to an from a void * byte buffer. See kvds_integral_type.hpp for an example and brief documentation on how to develop additional KvdsType objects. *** This class is NOT thread safe ***

Definition at line 65 of file kvds.hpp.


Member Typedef Documentation

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
typedef val_type moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::data_type

Definition at line 76 of file kvds.hpp.

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
typedef keyT moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::key_type

Definition at line 70 of file kvds.hpp.

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
typedef KvdsTypeKey<key_type const> moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::kvds_key_const_t [private]

Definition at line 81 of file kvds.hpp.

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
typedef KvdsTypeKey<key_type> moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::kvds_key_t [private]

Definition at line 79 of file kvds.hpp.

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
typedef KvdsTypeVal<val_type const> moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::kvds_val_const_t [private]

Definition at line 82 of file kvds.hpp.

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
typedef KvdsTypeVal<val_type> moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::kvds_val_t [private]

Definition at line 80 of file kvds.hpp.

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
typedef std::vector<val_type> moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::kvds_values_t

Definition at line 72 of file kvds.hpp.

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
typedef valT moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::val_type

Definition at line 71 of file kvds.hpp.

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
typedef std::pair<key_type, val_type> moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::value_type

Some syntactic suger to make this more STL like.

Definition at line 75 of file kvds.hpp.


Constructor & Destructor Documentation

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::Kvds ( ikvds_ptr_t  ikvds_ptr) [inline]

Definition at line 85 of file kvds.hpp.


Member Function Documentation

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
bool moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::add ( kvds_key_const_t const &  key,
kvds_val_const_t const &  val 
) const [inline]

Definition at line 172 of file kvds.hpp.

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
bool moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::clear ( ) const [inline]

Definition at line 190 of file kvds.hpp.

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
bool moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::count ( boost::uint64_t &  cnt) const [inline]

Definition at line 221 of file kvds.hpp.

Here is the caller graph for this function:

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
bool moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::empty ( ) const [inline]

Definition at line 238 of file kvds.hpp.

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
bool moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::erase ( kvds_key_const_t const &  key) const [inline]

Definition at line 185 of file kvds.hpp.

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
bool moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::exists ( kvds_key_const_t const &  key) const [inline]

Definition at line 180 of file kvds.hpp.

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
bool moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::get ( kvds_key_const_t const &  key,
kvds_val_t  val 
) const [inline]

Definition at line 110 of file kvds.hpp.

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
bool moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::get ( kvds_key_const_t const &  key,
kvds_values_t vals,
size_t const  count 
) const [inline]

Definition at line 122 of file kvds.hpp.

Here is the call graph for this function:

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
bool moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::get ( kvds_key_const_t const &  key,
kvds_values_t vals 
) const [inline]

Definition at line 145 of file kvds.hpp.

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
IKvds& moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::get_ikvds ( ) const [inline]

Just in case you need access to the low level interface, but why would you?

Mess with this at your own risk!!!

Definition at line 251 of file kvds.hpp.

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
ikvds_ptr_t moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::get_ikvds_ptr ( ) const [inline]

Mess with this at your own risk!!!

Definition at line 258 of file kvds.hpp.

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
bool moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::insert ( value_type const &  kvp) [inline]

Definition at line 167 of file kvds.hpp.

Here is the call graph for this function:

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
Iow moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::operator[] ( kvds_key_const_t const &  key) [inline]

Note that the indexer is semantically the same as a put meaning that any existing values will be overwritten!

Definition at line 311 of file kvds.hpp.

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
bool moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::put ( kvds_key_const_t const &  key,
kvds_val_const_t const &  val 
) const [inline]

Definition at line 92 of file kvds.hpp.

Here is the caller graph for this function:

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
bool moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::put ( kvds_key_const_t const &  key,
kvds_values_t const &  vals 
) const [inline]

Definition at line 100 of file kvds.hpp.

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
bool moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::size ( kvds_key_const_t const &  key,
size_t &  size 
) const [inline]

Definition at line 195 of file kvds.hpp.

Here is the call graph for this function:

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
size_t moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::size ( kvds_key_const_t const &  key) const [inline]

Definition at line 209 of file kvds.hpp.

Here is the call graph for this function:

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
boost::uint64_t moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::size ( ) const [inline]

Definition at line 226 of file kvds.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:


Friends And Related Function Documentation

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
friend class KvdsKeyIterator [friend]

Definition at line 67 of file kvds.hpp.


Member Data Documentation

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
ikvds_ptr_t moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::ikvds_ptr_ [private]

Definition at line 325 of file kvds.hpp.


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