replace dp_internal::Noncopyable by boost::noncopyable

This commit is contained in:
David Tardon 2010-11-16 12:31:21 +01:00
parent 2fc9ec4b71
commit 58d0d8fafd

View file

@ -28,6 +28,8 @@
#ifndef BERKELEYDBPROXY_DB_HXX_
#define BERKELEYDBPROXY_DB_HXX_
#include <boost/noncopyable.hpp>
#ifdef SYSTEM_DB
#include <db.h>
#else
@ -43,26 +45,12 @@ extern "C" {
typedef void (*db_free_fcn_type)(void *);
}
namespace berkeleydbproxy {
class DbEnv;
class Dbc;
class Dbt;
namespace db_internal
{
class Noncopyable
{
// not implemented
Noncopyable(const Noncopyable&);
void operator=(const Noncopyable&);
protected:
Noncopyable() {}
~Noncopyable() {}
};
}
class DESKTOP_DEPLOYMENTMISC_DLLPUBLIC DbException
{
rtl::OString what_;
@ -78,7 +66,7 @@ namespace berkeleydbproxy {
};
class DESKTOP_DEPLOYMENTMISC_DLLPUBLIC DbEnv : db_internal::Noncopyable
class DESKTOP_DEPLOYMENTMISC_DLLPUBLIC DbEnv : boost::noncopyable
{
friend class Db;
@ -89,7 +77,7 @@ namespace berkeleydbproxy {
static char *strerror(int);
};
class DESKTOP_DEPLOYMENTMISC_DLLPUBLIC Db : db_internal::Noncopyable
class DESKTOP_DEPLOYMENTMISC_DLLPUBLIC Db : boost::noncopyable
{
private:
DB* m_pDBP;
@ -116,7 +104,7 @@ namespace berkeleydbproxy {
int cursor(DB_TXN *txnid, Dbc **cursorp, u_int32_t flags);
};
class DESKTOP_DEPLOYMENTMISC_DLLPUBLIC Dbc : db_internal::Noncopyable
class DESKTOP_DEPLOYMENTMISC_DLLPUBLIC Dbc : boost::noncopyable
{
friend class Db;
friend class Dbt;
@ -156,20 +144,4 @@ namespace berkeleydbproxy {
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */