[svn] commit: r2297 - /branches/trac172/src/lib/config/config_data.cc

BIND 10 source code commits bind10-changes at lists.isc.org
Sun Jun 27 19:37:41 UTC 2010


Author: jelte
Date: Sun Jun 27 19:37:40 2010
New Revision: 2297

Log:
addressed review comments 2.1 of 3 (or 4)

Modified:
    branches/trac172/src/lib/config/config_data.cc

Modified: branches/trac172/src/lib/config/config_data.cc
==============================================================================
--- branches/trac172/src/lib/config/config_data.cc (original)
+++ branches/trac172/src/lib/config/config_data.cc Sun Jun 27 19:37:40 2010
@@ -26,6 +26,16 @@
 namespace isc {
 namespace config {
 
+//
+// Return a part of a specification, as identified by the
+// '/'-separated identifier.
+// If it cannot be found, a DataNotFound error is thrown.
+//
+// Recursively goes through the Element. If it is a List,
+// we search it contents to have 'items' (i.e. contain item_name)
+// If it is a map, we search through the list contained in its
+// 'map_item_spec' value. This code assumes the data has been
+// validated and conforms to the specification.
 static ElementPtr
 find_spec_part(ElementPtr spec, const std::string& identifier)
 {
@@ -97,6 +107,11 @@
     return spec_part;
 }
 
+//
+// Adds the names of the items in the given specification part.
+// If recurse is true, maps will also have their children added.
+// Result must be a ListElement
+//
 static void
 spec_name_list(ElementPtr result, ElementPtr spec_part, std::string prefix, bool recurse = false)
 {
@@ -129,6 +144,8 @@
 ElementPtr
 ConfigData::getValue(const std::string& identifier)
 {
+    // 'fake' is set, but dropped by this function and
+    // serves no further purpose.
     bool fake;
     return getValue(fake, identifier);
 }




More information about the bind10-changes mailing list