1/*-
2 * See the file LICENSE for redistribution information.
3 *
4 * Copyright (c) 1997,2008 Oracle.  All rights reserved.
5 *
6 * $Id: cxx_dbt.cpp,v 12.7 2008/01/08 20:58:09 bostic Exp $
7 */
8
9#include "db_config.h"
10
11#include "db_int.h"
12
13#include "db_cxx.h"
14#include "dbinc/cxx_int.h"
15
16#include "dbinc/db_page.h"
17#include "dbinc_auto/db_auto.h"
18#include "dbinc_auto/crdel_auto.h"
19#include "dbinc/db_dispatch.h"
20#include "dbinc_auto/db_ext.h"
21#include "dbinc_auto/common_ext.h"
22
23Dbt::Dbt()
24{
25	DBT *dbt = this;
26	memset(dbt, 0, sizeof(DBT));
27}
28
29Dbt::Dbt(void *data_arg, u_int32_t size_arg)
30{
31	DBT *dbt = this;
32	memset(dbt, 0, sizeof(DBT));
33	set_data(data_arg);
34	set_size(size_arg);
35}
36
37Dbt::~Dbt()
38{
39}
40
41Dbt::Dbt(const Dbt &that)
42{
43	const DBT *from = &that;
44	DBT *to = this;
45	memcpy(to, from, sizeof(DBT));
46}
47
48Dbt &Dbt::operator = (const Dbt &that)
49{
50	if (this != &that) {
51		const DBT *from = &that;
52		DBT *to = this;
53		memcpy(to, from, sizeof(DBT));
54	}
55	return (*this);
56}
57