lmdb++
Public Member Functions | Protected Attributes | List of all members
lmdb::val Class Reference

Wrapper class for MDB_val structures. More...

#include <lmdb++.h>

Public Member Functions

 val () noexcept=default
 Default constructor. More...
 
 val (const std::string &data) noexcept
 Constructor. More...
 
 val (const char *const data) noexcept
 Constructor. More...
 
 val (const void *const data, const std::size_t size) noexcept
 Constructor. More...
 
 val (val &&other) noexcept=default
 Move constructor. More...
 
valoperator= (val &&other) noexcept=default
 Move assignment operator. More...
 
 ~val () noexcept=default
 Destructor. More...
 
 operator MDB_val * () noexcept
 Returns an MDB_val* pointer. More...
 
 operator const MDB_val * () const noexcept
 Returns an MDB_val* pointer. More...
 
std::size_t size () const noexcept
 Returns the size of the data. More...
 
template<typename T >
T * data () noexcept
 Returns a pointer to the data;. More...
 
template<typename T >
const T * data () const noexcept
 Returns a pointer to the data;. More...
 
char * data () noexcept
 Returns a pointer to the data;. More...
 
const char * data () const noexcept
 Returns a pointer to the data;. More...
 
template<typename T >
valassign (const T *const data, const std::size_t size) noexcept
 Assigns the value. More...
 
valassign (const char *const data) noexcept
 Assigns the value. More...
 
valassign (const std::string &data) noexcept
 Assigns the value. More...
 

Protected Attributes

MDB_val _val
 

Detailed Description

Wrapper class for MDB_val structures.

Note
Instances of this class are movable and copyable both.
See also
http://symas.com/mdb/doc/group__mdb.html#structMDB__val

Constructor & Destructor Documentation

lmdb::val::val ( )
defaultnoexcept

Default constructor.

lmdb::val::val ( const std::string &  data)
inlinenoexcept

Constructor.

lmdb::val::val ( const char *const  data)
inlinenoexcept

Constructor.

lmdb::val::val ( const void *const  data,
const std::size_t  size 
)
inlinenoexcept

Constructor.

lmdb::val::val ( val &&  other)
defaultnoexcept

Move constructor.

lmdb::val::~val ( )
defaultnoexcept

Destructor.

Member Function Documentation

template<typename T >
val& lmdb::val::assign ( const T *const  data,
const std::size_t  size 
)
inlinenoexcept

Assigns the value.

val& lmdb::val::assign ( const char *const  data)
inlinenoexcept

Assigns the value.

val& lmdb::val::assign ( const std::string &  data)
inlinenoexcept

Assigns the value.

template<typename T >
T* lmdb::val::data ( )
inlinenoexcept

Returns a pointer to the data;.

template<typename T >
const T* lmdb::val::data ( ) const
inlinenoexcept

Returns a pointer to the data;.

char* lmdb::val::data ( )
inlinenoexcept

Returns a pointer to the data;.

const char* lmdb::val::data ( ) const
inlinenoexcept

Returns a pointer to the data;.

lmdb::val::operator const MDB_val * ( ) const
inlinenoexcept

Returns an MDB_val* pointer.

lmdb::val::operator MDB_val * ( )
inlinenoexcept

Returns an MDB_val* pointer.

val& lmdb::val::operator= ( val &&  other)
defaultnoexcept

Move assignment operator.

std::size_t lmdb::val::size ( ) const
inlinenoexcept

Returns the size of the data.

Member Data Documentation

MDB_val lmdb::val::_val
protected

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