[svn] commit: r3850 - in /branches/trac422/src/lib/datasrc: memory_datasrc.cc memory_datasrc.h zonetable.h
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Dec 15 22:51:46 UTC 2010
Author: jinmei
Date: Wed Dec 15 22:51:45 2010
New Revision: 3850
Log:
some suggested cleanups and comment changes. cleanups include:
- remoevd unnecessary #include: MemoryDataSrc doesn't need to know shared_ptr directly
- removed unnecessary "forward declaration": Result is imported by including zonetable.h
Modified:
branches/trac422/src/lib/datasrc/memory_datasrc.cc
branches/trac422/src/lib/datasrc/memory_datasrc.h
branches/trac422/src/lib/datasrc/zonetable.h
Modified: branches/trac422/src/lib/datasrc/memory_datasrc.cc
==============================================================================
--- branches/trac422/src/lib/datasrc/memory_datasrc.cc (original)
+++ branches/trac422/src/lib/datasrc/memory_datasrc.cc Wed Dec 15 22:51:45 2010
@@ -21,10 +21,13 @@
namespace isc {
namespace datasrc {
+/// Implementation details for \c MemoryDataSrc hidden from the public
+/// interface.
+///
+/// For now, \c MemoryDataSrc only contains a \c ZoneTable object, which
+/// consists of (pointers to) \c MemoryZone objects, we may add more
+/// member variables later for new features.
struct MemoryDataSrc::MemoryDataSrcImpl {
- /// For now, \c MemoryDataSrc only contains a \c ZoneTable object, which
- /// consists of (pointers to) \c MemoryZone objects, we may add more
- /// member variables later for new features.
ZoneTable zone_table;
};
Modified: branches/trac422/src/lib/datasrc/memory_datasrc.h
==============================================================================
--- branches/trac422/src/lib/datasrc/memory_datasrc.h (original)
+++ branches/trac422/src/lib/datasrc/memory_datasrc.h Wed Dec 15 22:51:45 2010
@@ -15,8 +15,6 @@
#ifndef __MEMORY_DATA_SOURCE_H
#define __MEMORY_DATA_SOURCE_H 1
-#include <boost/shared_ptr.hpp>
-
#include <datasrc/zonetable.h>
namespace isc {
@@ -25,16 +23,13 @@
};
namespace datasrc {
-namespace result {
-enum Result;
-};
/// \brief A data source that uses in memory dedicated backend.
///
/// The \c MemoryDataSrc class represents a data source and provides a
/// basic interface to help DNS lookup processing. For a given domain
-/// name, its \c find() method searches the in memory dedicated backend
-/// that gives a longest match against that name.
+/// name, its \c findZone() method searches the in memory dedicated backend
+/// for the zone that gives a longest match against that name.
///
/// The in memory dedicated backend are assumed to be of the same RR class,
/// but the \c MemoryDataSrc class does not enforce the assumption through
Modified: branches/trac422/src/lib/datasrc/zonetable.h
==============================================================================
--- branches/trac422/src/lib/datasrc/zonetable.h (original)
+++ branches/trac422/src/lib/datasrc/zonetable.h Wed Dec 15 22:51:45 2010
@@ -27,16 +27,19 @@
namespace datasrc {
namespace result {
- /// Result codes of various public methods of in memory data source
- ///
- /// The detailed semantics may differ in different methods.
- /// See the description of specific methods for more details.
- enum Result {
- SUCCESS, ///< The operation is successful.
- EXIST, ///< The zone is already stored in data source.
- NOTFOUND, ///< The specified zone is not found in data source.
- PARTIALMATCH ///< \c Only a partial match is found in \c find().
- };
+/// Result codes of various public methods of in memory data source
+///
+/// The detailed semantics may differ in different methods.
+/// See the description of specific methods for more details.
+///
+/// Note: this is intended to be used from other data sources eventually,
+/// but for now it's specific to in memory data source and its backend.
+enum Result {
+ SUCCESS, ///< The operation is successful.
+ EXIST, ///< The search key is already stored.
+ NOTFOUND, ///< The specified object is not found.
+ PARTIALMATCH ///< \c Only a partial match is found.
+};
}
/// \brief The base class for a single authoritative zone
More information about the bind10-changes
mailing list