Imported Upstream version 5.3.21
[platform/upstream/libdb.git] / lang / cxx / cxx_rid.cpp
1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 2011, 2012 Oracle and/or its affiliates.  All rights reserved.
5  *
6  * $Id$
7  */
8
9 #include "db_config.h"
10
11 #include "db_int.h"
12
13 #include "db_cxx.h"
14
15 DbHeapRecordId::DbHeapRecordId()
16 {
17         DB_HEAP_RID *rid = this;
18         memset(rid, 0, sizeof(DB_HEAP_RID));
19 }
20
21 DbHeapRecordId::DbHeapRecordId(db_pgno_t pgno_arg, db_indx_t indx_arg)
22 {
23         DB_HEAP_RID *rid = this;
24         memset(rid, 0, sizeof(DB_HEAP_RID));
25         set_pgno(pgno_arg);
26         set_indx(indx_arg);
27 }
28
29 DbHeapRecordId::~DbHeapRecordId()
30 {
31 }
32
33 DbHeapRecordId::DbHeapRecordId(const DbHeapRecordId &that)
34 {
35         const DB_HEAP_RID *from = &that;
36         memcpy((DB_HEAP_RID *)this, from, sizeof(DB_HEAP_RID));
37 }
38
39 DbHeapRecordId &DbHeapRecordId::operator = (const DbHeapRecordId &that)
40 {
41         if (this != &that) {
42                 const DB_HEAP_RID *from = &that;
43                 memcpy((DB_HEAP_RID *)this, from, sizeof(DB_HEAP_RID));
44         }
45         return (*this);
46 }