Main Page | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Related Pages

cxx_dbt.cpp

00001 /*-
00002  * See the file LICENSE for redistribution information.
00003  *
00004  * Copyright (c) 1997-2005
00005  *      Sleepycat Software.  All rights reserved.
00006  *
00007  * $Id: cxx_dbt.cpp,v 12.1 2005/06/16 20:20:58 bostic Exp $
00008  */
00009 
00010 #include "db_config.h"
00011 
00012 #include <errno.h>
00013 #include <string.h>
00014 
00015 #include "db_cxx.h"
00016 #include "dbinc/cxx_int.h"
00017 
00018 #include "db_int.h"
00019 #include "dbinc/db_page.h"
00020 #include "dbinc_auto/db_auto.h"
00021 #include "dbinc_auto/crdel_auto.h"
00022 #include "dbinc/db_dispatch.h"
00023 #include "dbinc_auto/db_ext.h"
00024 #include "dbinc_auto/common_ext.h"
00025 
00026 Dbt::Dbt()
00027 {
00028         DBT *dbt = this;
00029         memset(dbt, 0, sizeof(DBT));
00030 }
00031 
00032 Dbt::Dbt(void *data_arg, u_int32_t size_arg)
00033 {
00034         DBT *dbt = this;
00035         memset(dbt, 0, sizeof(DBT));
00036         set_data(data_arg);
00037         set_size(size_arg);
00038 }
00039 
00040 Dbt::~Dbt()
00041 {
00042 }
00043 
00044 Dbt::Dbt(const Dbt &that)
00045 {
00046         const DBT *from = &that;
00047         DBT *to = this;
00048         memcpy(to, from, sizeof(DBT));
00049 }
00050 
00051 Dbt &Dbt::operator = (const Dbt &that)
00052 {
00053         if (this != &that) {
00054                 const DBT *from = &that;
00055                 DBT *to = this;
00056                 memcpy(to, from, sizeof(DBT));
00057         }
00058         return (*this);
00059 }

Generated on Sun Dec 25 12:14:18 2005 for Berkeley DB 4.4.16 by  doxygen 1.4.2