Browse Source

[2309] made findAtOrigin virtual again, removing the Impl protected method.

as this seemed to be a controversial move.
JINMEI Tatuya 12 years ago
parent
commit
a333e6c631
2 changed files with 8 additions and 23 deletions
  1. 2 2
      src/lib/datasrc/zone_finder.cc
  2. 6 21
      src/lib/datasrc/zone_finder.h

+ 2 - 2
src/lib/datasrc/zone_finder.cc

@@ -83,8 +83,8 @@ copyRRset(const AbstractRRset& rrset, const RRTTL& ttl) {
 }
 
 ZoneFinderContextPtr
-ZoneFinder::findAtOriginImpl(const dns::RRType& type, bool use_minttl,
-                             FindOptions options)
+ZoneFinder::findAtOrigin(const dns::RRType& type, bool use_minttl,
+                         FindOptions options)
 {
     ZoneFinderContextPtr context = find(getOrigin(), type, options);
 

+ 6 - 21
src/lib/datasrc/zone_finder.h

@@ -583,7 +583,7 @@ public:
     ///
     /// In terms of API this method is equivalent to a call to \c find() where
     /// the \c name parameter is the zone origin (return value of
-    /// \c getOrigin()) and is redundant.  This method is provided as a
+    /// \c getOrigin()) and is redundant.  This method is provided as an
     /// optimization point for some kind of finder implementations that can
     /// exploit the fact that the query name is the zone origin and for
     /// applications that want to possibly benefit from such implementations.
@@ -611,10 +611,10 @@ public:
     /// much faster if the need for it is known beforehand.
     ///
     /// If the underlying finder implementation wants to optimize these cases,
-    /// it can do so by overriding the \c findAtOriginImpl() protected method.
-    /// It has the default implementation for any other implementations, which
-    /// should work for any finder implementation as long as it conforms to
-    /// other public interfaces.
+    /// it can do so by specializing the method.  It has the default
+    /// implementation for any other implementations, which should work for
+    /// any finder implementation as long as it conforms to other public
+    /// interfaces.
     ///
     /// So, an implementation of a finder does not have to care about this
     /// method unless it sees the need for optimizing the behavior.
@@ -632,22 +632,7 @@ public:
     ///
     /// \return A \c FindContext object enclosing the search result.
     ///         See \c find().
-    boost::shared_ptr<Context> findAtOrigin(
-        const isc::dns::RRType& type, bool use_minttl,
-        FindOptions options)
-    {
-        return (findAtOriginImpl(type, use_minttl, options));
-    }
-
-protected:
-    /// \brief Actual implementation of \c findAtOrigin().
-    ///
-    /// This is separated from the public \c findAtOrigin() method so that
-    /// the interface can be changed (if and when necessary) without affecting
-    /// the user applications of the public method.  It has the default
-    /// implementation; normally the specific derived class does not have to
-    /// override it.
-    virtual boost::shared_ptr<Context> findAtOriginImpl(
+    virtual boost::shared_ptr<Context> findAtOrigin(
         const isc::dns::RRType& type, bool use_minttl,
         FindOptions options);