ham::key Class Reference

#include <hamsterdb.hpp>

Public Member Functions

 key (void *data=0, ham_size_t size=0, ham_u32_t flags=0)
 key (const key &other)
keyoperator= (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_tget_handle ()
int get_approximate_match_type ()

Private Attributes

ham_key_t m_key

Detailed Description

A key class.

This class wraps structures of type ham_key_t.

Definition at line 86 of file hamsterdb.hpp.


Constructor & Destructor Documentation

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, 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.


Member Function Documentation

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.

key& ham::key::operator= ( const key other  )  [inline]

Assignment operator.

Definition at line 103 of file hamsterdb.hpp.

References m_key.

template<class T >
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 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 HAM_INV_KEYSIZE, m_key, and ham_key_t::size.

Referenced by set().


Field Documentation


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

Generated on Thu Feb 11 22:04:58 2010 for hamsterdb Embedded Database by  doxygen 1.6.1