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...
val & | operator= (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 >
val & | assign (const T *const data, const std::size_t size) noexcept
| Assigns the value. More...
val & | assign (const char *const data) noexcept
| Assigns the value. More...
val & | assign (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 | ( |  | ) |

default noexcept

Default constructor.

## val() [2/5]

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

inline noexcept

Constructor.

## val() [3/5]

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

inline noexcept

Constructor.

## val() [4/5]

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

inline noexcept

Constructor.

## val() [5/5]

lmdb::val::val | ( | val && | other | ) |

default noexcept

Move constructor.

## ~val()

lmdb::val::~val | ( |  | ) |

default noexcept

Destructor.

## Member Function Documentation

## assign() [1/3]

template<typename T >

val& lmdb::val::assign | ( | const T *const | data,
|  | const std::size_t | size
| ) |  |

inline noexcept

Assigns the value.

## assign() [2/3]

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

inline noexcept

Assigns the value.

## assign() [3/3]

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

inline noexcept

Assigns the value.

## data() [1/4]

template<typename T >

T* lmdb::val::data | ( |  | ) |

inline noexcept

Returns a pointer to the data.

## data() [2/4]

template<typename T >

const T* lmdb::val::data | ( |  | ) | const

inline noexcept

Returns a pointer to the data.

## data() [3/4]

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

inline noexcept

Returns a pointer to the data.

## data() [4/4]

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

inline noexcept

Returns a pointer to the data.

## empty()

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

inline noexcept

Determines whether this value is empty.

## operator const MDB_val *()

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

inline noexcept

Returns an `MDB_val*` pointer.

## operator MDB_val *()

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

inline noexcept

Returns an `MDB_val*` pointer.

## operator=()

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

default noexcept

Move assignment operator.

## size()

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

inline noexcept

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:

- lmdb++.h