Browse Source

[2100] use boost::noncopyable to make the class noncopyable by convention

JINMEI Tatuya 12 years ago
parent
commit
0c16bd99c0
1 changed files with 2 additions and 12 deletions
  1. 2 12
      src/lib/datasrc/memory/zone_table.h

+ 2 - 12
src/lib/datasrc/memory/zone_table.h

@@ -20,6 +20,7 @@
 #include <datasrc/result.h>
 #include <datasrc/result.h>
 #include <datasrc/memory/domaintree.h>
 #include <datasrc/memory/domaintree.h>
 
 
+#include <boost/noncopyable.hpp>
 #include <boost/interprocess/offset_ptr.hpp>
 #include <boost/interprocess/offset_ptr.hpp>
 
 
 namespace isc {
 namespace isc {
@@ -57,7 +58,7 @@ class ZoneData;
 ///
 ///
 /// This class is intended to be used as a backend for the \c MemoryDataSrc
 /// This class is intended to be used as a backend for the \c MemoryDataSrc
 /// class, and is not intended to be used for other general purposes.
 /// class, and is not intended to be used for other general purposes.
-class ZoneTable {
+class ZoneTable : boost::noncopyable {
 private:
 private:
     // The deleter for the zone data stored in the table.
     // The deleter for the zone data stored in the table.
     struct ZoneDataDeleter {
     struct ZoneDataDeleter {
@@ -90,17 +91,7 @@ public:
         const ZoneData* const zone_data;
         const ZoneData* const zone_data;
     };
     };
 
 
-    ///
-    /// \name Constructors and Destructor.
-    ///
-    /// \b Note:
-    /// The copy constructor and the assignment operator are intentionally
-    /// defined as private, making this class non copyable.
-    //@{
 private:
 private:
-    ZoneTable(const ZoneTable& source);
-    ZoneTable& operator=(const ZoneTable& source);
-
     /// Constructor.
     /// Constructor.
     ///
     ///
     /// An object of this class is always expected to be created by the
     /// An object of this class is always expected to be created by the
@@ -111,7 +102,6 @@ private:
     /// It never throws an exception otherwise.
     /// It never throws an exception otherwise.
     ZoneTable(ZoneTableTree* zones) : zones_(zones)
     ZoneTable(ZoneTableTree* zones) : zones_(zones)
     {}
     {}
-    //@}
 
 
 public:
 public:
     /// \brief Allocate and construct \c ZoneTable
     /// \brief Allocate and construct \c ZoneTable