summaryrefslogtreecommitdiff
path: root/src/mongo/client
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2015-06-15 14:54:26 -0400
committerAndrew Morrow <acm@mongodb.com>2015-06-16 16:31:58 -0400
commit22dd61cfe60e05b13f9bb92aee3cb4660392435b (patch)
tree2046de28fe9e566dd9b1c023c9feec88385e480d /src/mongo/client
parentbe88e42ef819aeb76b8625e646adf67626844c25 (diff)
downloadmongo-22dd61cfe60e05b13f9bb92aee3cb4660392435b.tar.gz
SERVER-18991 Replace all usages of boost::noncopyable with MONGO_DISALLOW_COPYING
Diffstat (limited to 'src/mongo/client')
-rw-r--r--src/mongo/client/connpool.h4
-rw-r--r--src/mongo/client/dbclientcursor.h7
-rw-r--r--src/mongo/client/dbclientinterface.h8
3 files changed, 11 insertions, 8 deletions
diff --git a/src/mongo/client/connpool.h b/src/mongo/client/connpool.h
index 1c6728d3352..fd0204dd46a 100644
--- a/src/mongo/client/connpool.h
+++ b/src/mongo/client/connpool.h
@@ -29,7 +29,6 @@
#pragma once
-#include <boost/noncopyable.hpp>
#include <stack>
#include "mongo/client/dbclientinterface.h"
@@ -266,7 +265,8 @@ namespace mongo {
};
- class AScopedConnection : boost::noncopyable {
+ class AScopedConnection {
+ MONGO_DISALLOW_COPYING(AScopedConnection);
public:
AScopedConnection() { _numConnections.fetchAndAdd(1); }
virtual ~AScopedConnection() { _numConnections.fetchAndAdd(-1); }
diff --git a/src/mongo/client/dbclientcursor.h b/src/mongo/client/dbclientcursor.h
index 4dca614591f..6f125063b60 100644
--- a/src/mongo/client/dbclientcursor.h
+++ b/src/mongo/client/dbclientcursor.h
@@ -29,7 +29,6 @@
#pragma once
-#include <boost/noncopyable.hpp>
#include <stack>
#include "mongo/client/dbclientinterface.h"
@@ -44,7 +43,8 @@ namespace mongo {
/** for mock purposes only -- do not create variants of DBClientCursor, nor hang code here
@see DBClientMockCursor
*/
- class DBClientCursorInterface : boost::noncopyable {
+ class DBClientCursorInterface {
+ MONGO_DISALLOW_COPYING(DBClientCursorInterface);
public:
virtual ~DBClientCursorInterface() {}
virtual bool more() = 0;
@@ -204,7 +204,8 @@ namespace mongo {
void initLazy( bool isRetry = false );
bool initLazyFinish( bool& retry );
- class Batch : boost::noncopyable {
+ class Batch {
+ MONGO_DISALLOW_COPYING(Batch);
friend class DBClientCursor;
std::unique_ptr<Message> m;
int nReturned;
diff --git a/src/mongo/client/dbclientinterface.h b/src/mongo/client/dbclientinterface.h
index a41d6cac357..853cae2d898 100644
--- a/src/mongo/client/dbclientinterface.h
+++ b/src/mongo/client/dbclientinterface.h
@@ -28,8 +28,6 @@
#pragma once
-#include <boost/noncopyable.hpp>
-
#include "mongo/base/string_data.h"
#include "mongo/client/connection_string.h"
#include "mongo/client/read_preference.h"
@@ -372,7 +370,8 @@ namespace mongo {
/**
The interface that any db connection should implement
*/
- class DBClientInterface : boost::noncopyable {
+ class DBClientInterface {
+ MONGO_DISALLOW_COPYING(DBClientInterface);
public:
virtual std::unique_ptr<DBClientCursor> query(const std::string &ns, Query query, int nToReturn = 0, int nToSkip = 0,
const BSONObj *fieldsToReturn = 0, int queryOptions = 0 , int batchSize = 0 ) = 0;
@@ -409,6 +408,9 @@ namespace mongo {
/** don't use this - called automatically by DBClientCursor for you */
virtual std::unique_ptr<DBClientCursor> getMore( const std::string &ns, long long cursorId, int nToReturn = 0, int options = 0 ) = 0;
+
+ protected:
+ DBClientInterface() = default;
};
/**