From 06369c8cedbb06a554012069c8973423b32d9452 Mon Sep 17 00:00:00 2001 From: Kaloian Manassiev Date: Sun, 4 Jun 2017 11:38:29 +0100 Subject: SERVER-29464 Get rid of BSONSerializable --- src/mongo/s/write_ops/batched_command_response.h | 29 +++++++----------------- 1 file changed, 8 insertions(+), 21 deletions(-) (limited to 'src/mongo/s/write_ops/batched_command_response.h') diff --git a/src/mongo/s/write_ops/batched_command_response.h b/src/mongo/s/write_ops/batched_command_response.h index 3f0fef9491f..0789d3cf2d7 100644 --- a/src/mongo/s/write_ops/batched_command_response.h +++ b/src/mongo/s/write_ops/batched_command_response.h @@ -31,11 +31,11 @@ #include #include +#include "mongo/base/disallow_copying.h" #include "mongo/base/string_data.h" #include "mongo/db/jsobj.h" #include "mongo/db/repl/optime.h" #include "mongo/rpc/write_concern_error_detail.h" -#include "mongo/s/bson_serializable.h" #include "mongo/s/write_ops/batched_upsert_detail.h" #include "mongo/s/write_ops/write_error_detail.h" @@ -45,7 +45,8 @@ namespace mongo { * This class represents the layout and content of a insert/update/delete runCommand, * the response side. */ -class BatchedCommandResponse : public BSONSerializable { +class BatchedCommandResponse { + MONGO_DISALLOW_COPYING(BatchedCommandResponse); public: // @@ -62,32 +63,18 @@ public: static const BSONField> writeErrors; static const BSONField writeConcernError; - // - // construction / destruction - // - BatchedCommandResponse(); - virtual ~BatchedCommandResponse(); - - // - // BatchedCommandResponse should have a move constructor but not a copy constructor - // - BatchedCommandResponse(BatchedCommandResponse&&) = default; BatchedCommandResponse& operator=(BatchedCommandResponse&&) = default; /** Copies all the fields present in 'this' to 'other'. */ void cloneTo(BatchedCommandResponse* other) const; - // - // bson serializable interface implementation - // - - virtual bool isValid(std::string* errMsg) const; - virtual BSONObj toBSON() const; - virtual bool parseBSON(const BSONObj& source, std::string* errMsg); - virtual void clear(); - virtual std::string toString() const; + bool isValid(std::string* errMsg) const; + BSONObj toBSON() const; + bool parseBSON(const BSONObj& source, std::string* errMsg); + void clear(); + std::string toString() const; // // individual field accessors -- cgit v1.2.1