libmoost
moost::kvds::KvdsPodType< T >::vector_type Class Reference

To support getall and putall we need to handle vectors of kvds_type. More...

#include <kvds_pod_type.hpp>

List of all members.

Classes

struct  kvds_vector
struct  kvds_vector< U const >

Public Types

typedef kvds_vector< kvds_type >
::type 
kvds_vector_type
 Make a friendly typedef for our vector type.

Public Member Functions

 vector_type (kvds_vector_type &kvt)
void resize (size_t const size)
size_t size () const
 Return the size of the mutable byte buffer.
kvds_typeoperator& ()
 Return pointer to mutable byte buffer.
kvds_vector_typeoperator* ()

Private Attributes

kvds_vector_typekvt_
size_t kvt_size_

Detailed Description

template<typename T>
class moost::kvds::KvdsPodType< T >::vector_type

To support getall and putall we need to handle vectors of kvds_type.

Definition at line 134 of file kvds_pod_type.hpp.


Member Typedef Documentation

Make a friendly typedef for our vector type.

Definition at line 156 of file kvds_pod_type.hpp.


Constructor & Destructor Documentation

template<typename T>
moost::kvds::KvdsPodType< T >::vector_type::vector_type ( kvds_vector_type kvt) [inline]

Although not neessary for interal types, during construction you would create a mutable byte buffer that represents the contents of the kvds_type vector, so it can be passed as a pointer and size to the kvds engine for serialisation.

Definition at line 162 of file kvds_pod_type.hpp.


Member Function Documentation

template<typename T>
kvds_type* moost::kvds::KvdsPodType< T >::vector_type::operator& ( ) [inline]

Return pointer to mutable byte buffer.

Definition at line 184 of file kvds_pod_type.hpp.

template<typename T>
kvds_vector_type& moost::kvds::KvdsPodType< T >::vector_type::operator* ( ) [inline]

Return a reference to the kvds_vector_type associated with the mutable buffer. If necessary the kvds_type should be assembled from the mutable byte buffer. This will be called after any operations that might have mutated the buffer to give the KvdsType a chance to assemble the type. If the buffer size not a divisor of sizeof(kvds_type) an exception should thrown. In the case of integral types no assembly is required. Checks should be performed to only assemble the type if the byte buffer has been modified since this operator was last called to avoid any unnecessary overhead.

Definition at line 194 of file kvds_pod_type.hpp.

template<typename T>
void moost::kvds::KvdsPodType< T >::vector_type::resize ( size_t const  size) [inline]

Resize the mutable byte buffer so it's large enough to accomodate any incoming buffer data, which will be used. If the size not a divisor of sizeof(kvds_type) an exception should thrown. In the case of integral types the mutable buffer is the vector of kvds_type's but for other types this will probably be a seperate buffer.

Definition at line 169 of file kvds_pod_type.hpp.

Here is the call graph for this function:

template<typename T>
size_t moost::kvds::KvdsPodType< T >::vector_type::size ( ) const [inline]

Return the size of the mutable byte buffer.

Definition at line 181 of file kvds_pod_type.hpp.

Here is the caller graph for this function:


Member Data Documentation

template<typename T>
kvds_vector_type& moost::kvds::KvdsPodType< T >::vector_type::kvt_ [private]

Definition at line 197 of file kvds_pod_type.hpp.

template<typename T>
size_t moost::kvds::KvdsPodType< T >::vector_type::kvt_size_ [private]

Definition at line 198 of file kvds_pod_type.hpp.


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