From: Mukund Sivaraman Date: Mon, 21 Jan 2013 06:30:14 +0000 (+0530) Subject: [2435] Make isc::datasrc::RRsetCollectionBase complete X-Git-Tag: bind10-1.0.0-rc-release~89 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a60ee6bbefe447f7ce863641dd88cdb1d3f0766b;p=thirdparty%2Fkea.git [2435] Make isc::datasrc::RRsetCollectionBase complete --- diff --git a/src/lib/datasrc/database.cc b/src/lib/datasrc/database.cc index 4b5b8d19d3..195793a713 100644 --- a/src/lib/datasrc/database.cc +++ b/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."); - } }; // diff --git a/src/lib/datasrc/rrset_collection_base.h b/src/lib/datasrc/rrset_collection_base.h index afc8959450..0abaa82719 100644 --- a/src/lib/datasrc/rrset_collection_base.h +++ b/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_;