cxx_lock.cpp 1003 Bytes
Newer Older
1 2 3
/*-
 * See the file LICENSE for redistribution information.
 *
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
4
 * Copyright (c) 1997-2002
5 6 7 8 9 10
 *	Sleepycat Software.  All rights reserved.
 */

#include "db_config.h"

#ifndef lint
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
11
static const char revid[] = "$Id: cxx_lock.cpp,v 11.17 2002/03/27 04:31:16 bostic Exp $";
12 13 14 15 16 17
#endif /* not lint */

#include <errno.h>
#include <string.h>

#include "db_cxx.h"
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
18
#include "dbinc/cxx_int.h"
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45

////////////////////////////////////////////////////////////////////////
//                                                                    //
//                            DbLock                                  //
//                                                                    //
////////////////////////////////////////////////////////////////////////

DbLock::DbLock(DB_LOCK value)
:	lock_(value)
{
}

DbLock::DbLock()
{
	memset(&lock_, 0, sizeof(DB_LOCK));
}

DbLock::DbLock(const DbLock &that)
:	lock_(that.lock_)
{
}

DbLock &DbLock::operator = (const DbLock &that)
{
	lock_ = that.lock_;
	return (*this);
}