libmoost
moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::Iow Class Reference
Collaboration diagram for moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::Iow:

List of all members.

Public Member Functions

 Iow (Kvds &kvds, kvds_key_const_t const &key)
Iowoperator= (val_type const &val)
val_typeoperator* ()
 operator val_type const ()

Private Attributes

Kvdskvds_
kvds_key_const_t const & key_
val_type val_

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 >::Iow

Index operators normally return a reference to a value held within and when you then assign to an inderer you are actually assigning to the reference that has been returned. This won't work for a kvds because the reference returned would not update the store if it was modified. To get around this we return a value that is wrapped in a special class that implements an operator = and a cast operator. On return, if an assignment is made it will invoke the operator = which will update the value and the kvds store. If the result is assigned to a val_type the cast operator is invoked to return a copy of the value_type. The cost of this convenience is that a copy of the value type must be taken. In relality most compilers will optimise this away using RVO (Return Value Optimisation). http:///en.wikipedia.org/wiki/Return_value_optimization

Definition at line 279 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 >::Iow::Iow ( Kvds kvds,
kvds_key_const_t const &  key 
) [inline]

Definition at line 282 of file kvds.hpp.


Member Function Documentation

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

Definition at line 301 of file kvds.hpp.

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

Definition at line 299 of file kvds.hpp.

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

Definition at line 287 of file kvds.hpp.

Here is the call graph for this function:


Member Data Documentation

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

Definition at line 305 of file kvds.hpp.

template<typename keyT , typename valT , template< typename > class KvdsTypeKey = KvdsIntegralType, template< typename > class KvdsTypeVal = KvdsIntegralType>
Kvds& moost::kvds::Kvds< keyT, valT, KvdsTypeKey, KvdsTypeVal >::Iow::kvds_ [private]

Definition at line 304 of file kvds.hpp.

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

Definition at line 306 of file kvds.hpp.


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