libmoost
|
To support getall and putall we need to handle vectors of kvds_type. More...
#include <kvds_pod_type.hpp>
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_type * | operator& () |
Return pointer to mutable byte buffer. | |
kvds_vector_type & | operator* () |
Private Attributes | |
kvds_vector_type & | kvt_ |
size_t | kvt_size_ |
To support getall and putall we need to handle vectors of kvds_type.
Definition at line 134 of file kvds_pod_type.hpp.
typedef kvds_vector<kvds_type>::type moost::kvds::KvdsPodType< T >::vector_type::kvds_vector_type |
Make a friendly typedef for our vector type.
Definition at line 156 of file kvds_pod_type.hpp.
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.
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.
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.
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.
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.
kvds_vector_type& moost::kvds::KvdsPodType< T >::vector_type::kvt_ [private] |
Definition at line 197 of file kvds_pod_type.hpp.
size_t moost::kvds::KvdsPodType< T >::vector_type::kvt_size_ [private] |
Definition at line 198 of file kvds_pod_type.hpp.