#include <hamsterdb.hpp>
Public Member Functions | |
key (void *data=0, ham_size_t size=0, ham_u32_t flags=0) | |
key (const key &other) | |
key & | operator= (const key &other) |
void * | get_data () const |
void | set_data (void *data) |
ham_size_t | get_size () const |
void | set_size (ham_size_t size) |
template<class T > | |
void | set (T &t) |
ham_u32_t | get_flags () const |
void | set_flags (ham_u32_t flags) |
ham_key_t * | get_handle () |
int | get_approximate_match_type () |
Private Attributes | |
ham_key_t | m_key |
A key class.
This class wraps structures of type ham_key_t.
Definition at line 86 of file hamsterdb.hpp.
ham::key::key | ( | void * | data = 0 , |
|
ham_size_t | size = 0 , |
|||
ham_u32_t | flags = 0 | |||
) | [inline] |
Constructor
Definition at line 89 of file hamsterdb.hpp.
References ham_key_t::data, error(), ham_key_t::flags, HAM_INV_KEYSIZE, m_key, and ham_key_t::size.
ham::key::key | ( | const key & | other | ) | [inline] |
Copy constructor.
Definition at line 99 of file hamsterdb.hpp.
int ham::key::get_approximate_match_type | ( | ) | [inline] |
Returns 'sign' of Approximate Match
Definition at line 158 of file hamsterdb.hpp.
References ham_key_get_approximate_match_type(), and m_key.
void* ham::key::get_data | ( | ) | const [inline] |
Returns the key data.
Definition at line 114 of file hamsterdb.hpp.
References ham_key_t::data, and m_key.
ham_u32_t ham::key::get_flags | ( | ) | const [inline] |
Returns the flags of the key.
Definition at line 143 of file hamsterdb.hpp.
References ham_key_t::flags, and m_key.
ham_key_t* ham::key::get_handle | ( | ) | [inline] |
Returns a pointer to the internal ham_key_t structure.
Definition at line 153 of file hamsterdb.hpp.
References m_key.
Referenced by ham::db::erase(), ham::cursor::find(), ham::db::find(), ham::cursor::find_ex(), ham::cursor::insert(), ham::db::insert(), and ham::cursor::move().
ham_size_t ham::key::get_size | ( | ) | const [inline] |
Returns the size of the key.
Definition at line 124 of file hamsterdb.hpp.
References m_key, and ham_key_t::size.
void ham::key::set | ( | T & | t | ) | [inline] |
Template assignment
Definition at line 137 of file hamsterdb.hpp.
References set_data(), and set_size().
void ham::key::set_data | ( | void * | data | ) | [inline] |
Sets the key data.
Definition at line 119 of file hamsterdb.hpp.
References ham_key_t::data, and m_key.
Referenced by run_demo(), and set().
void ham::key::set_flags | ( | ham_u32_t | flags | ) | [inline] |
Sets the flags of the key.
Definition at line 148 of file hamsterdb.hpp.
References ham_key_t::flags, and m_key.
void ham::key::set_size | ( | ham_size_t | size | ) | [inline] |
Sets the size of the key.
Definition at line 129 of file hamsterdb.hpp.
References error(), HAM_INV_KEYSIZE, m_key, and ham_key_t::size.
Referenced by run_demo(), and set().
ham_key_t ham::key::m_key [private] |
Definition at line 164 of file hamsterdb.hpp.
Referenced by get_approximate_match_type(), get_data(), get_flags(), get_handle(), get_size(), key(), operator=(), set_data(), set_flags(), and set_size().