mariadb/cxx/db_cxx.h
Bradley C. Kuszmaul a58dc6af93 Start trying to write a c++ interface. Addresses #197.
git-svn-id: file:///svn/tokudb@1175 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-17 22:00:54 +00:00

26 lines
566 B
C++

#include <db.h>
#include <string.h>
class Dbt;
// DBT and Dbt objects are interchangeable. So watch out if you use Dbt to make other classes (e.g., with subclassing)
class Dbt : private DBT
{
public:
void * get_data(void) const { return data; }
void set_data(void *p) { data = p; }
u_int32_t get_size(void) const { return size; }
void set_size(u_int32_t p) { size = p; }
DBT *get_DBT(void) { return (DBT*)this; }
Dbt(void);
~Dbt();
private:
// Nothing here.
}
;