Browse Source

[2435] Make isc::datasrc::RRsetCollectionBase complete

Mukund Sivaraman 12 years ago
parent
commit
a60ee6bbef
2 changed files with 10 additions and 17 deletions
  1. 0 12
      src/lib/datasrc/database.cc
  2. 10 5
      src/lib/datasrc/rrset_collection_base.h

+ 0 - 12
src/lib/datasrc/database.cc

@@ -1398,18 +1398,6 @@ public:
     void disableWrapper() {
         disable();
     }
-
-protected:
-    // TODO: RRsetCollectionBase::Iter is not implemented and the
-    // following two methods just throw.
-
-    virtual RRsetCollectionBase::IterPtr getBeginning() {
-        isc_throw(NotImplemented, "This method is not implemented.");
-    }
-
-    virtual RRsetCollectionBase::IterPtr getEnd() {
-        isc_throw(NotImplemented, "This method is not implemented.");
-    }
 };
 
 //

+ 10 - 5
src/lib/datasrc/rrset_collection_base.h

@@ -27,9 +27,8 @@ class ZoneUpdater;
 
 /// \brief datasrc derivation of \c isc::dns::RRsetCollectionBase.
 ///
-/// This is an abstract class that adds datasrc related detail to
-/// \c isc::dns::RRsetCollectionBase. Derived classes need to complete
-/// the implementation (add iterator support, etc.) before using it.
+/// This is a default datasrc implementation of
+/// \c isc::dns::RRsetCollectionBase that adds datasrc related detail.
 class RRsetCollectionBase : public isc::dns::RRsetCollectionBase {
 public:
     /// \brief Constructor.
@@ -93,7 +92,10 @@ protected:
     /// \throw isc::dns::RRsetCollectionError if using the iterator
     /// results in some underlying datasrc error, or if \c disable() was
     /// called.
-    virtual IterPtr getBeginning() = 0;
+    /// \throw isc::NotImplemented as it's not implemented currently.
+    virtual IterPtr getBeginning() {
+        isc_throw(NotImplemented, "This method is not implemented.");
+    }
 
     /// \brief See \c isc::dns::RRsetCollectionBase::getEnd() for
     /// documentation.
@@ -101,7 +103,10 @@ protected:
     /// \throw isc::dns::RRsetCollectionError if using the iterator
     /// results in some underlying datasrc error, or if \c disable() was
     /// called.
-    virtual IterPtr getEnd() = 0;
+    /// \throw isc::NotImplemented as it's not implemented currently.
+    virtual IterPtr getEnd() {
+        isc_throw(NotImplemented, "This method is not implemented.");
+    }
 
 private:
     ZoneUpdater& updater_;