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...
 
bool empty () const noexcept
 Determines whether this value is empty. 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

◆ val() [1/5]

lmdb::val::val ( )
defaultnoexcept

Default constructor.

◆ val() [2/5]

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

Constructor.

◆ val() [3/5]

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

Constructor.

◆ val() [4/5]

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

Constructor.

◆ val() [5/5]

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

Move constructor.

◆ ~val()

lmdb::val::~val ( )
defaultnoexcept

Destructor.

Member Function Documentation

◆ assign() [1/3]

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

Assigns the value.

◆ assign() [2/3]

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

Assigns the value.

◆ assign() [3/3]

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

Assigns the value.

◆ data() [1/4]

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

Returns a pointer to the data.

◆ data() [2/4]

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

Returns a pointer to the data.

◆ data() [3/4]

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

Returns a pointer to the data.

◆ data() [4/4]

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

Returns a pointer to the data.

◆ empty()

bool lmdb::val::empty ( ) const
inlinenoexcept

Determines whether this value is empty.

◆ operator const MDB_val *()

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

Returns an MDB_val* pointer.

◆ operator MDB_val *()

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

Returns an MDB_val* pointer.

◆ operator=()

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

Move assignment operator.

◆ size()

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

Returns the size of the data.

Member Data Documentation

◆ _val

MDB_val lmdb::val::_val
protected

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