[svn] commit: r559 - in /branches/parkinglot/src/bin/parkinglot: data_source.h data_source_plot.cc data_source_plot.h zoneset.h
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Jan 27 05:06:47 UTC 2010
Author: jinmei
Date: Wed Jan 27 05:06:46 2010
New Revision: 559
Log:
constified class member functions whenever possible.
Modified:
branches/parkinglot/src/bin/parkinglot/data_source.h
branches/parkinglot/src/bin/parkinglot/data_source_plot.cc
branches/parkinglot/src/bin/parkinglot/data_source_plot.h
branches/parkinglot/src/bin/parkinglot/zoneset.h
Modified: branches/parkinglot/src/bin/parkinglot/data_source.h
==============================================================================
--- branches/parkinglot/src/bin/parkinglot/data_source.h (original)
+++ branches/parkinglot/src/bin/parkinglot/data_source.h Wed Jan 27 05:06:46 2010
@@ -91,7 +91,7 @@
virtual SearchResult findRRsets(const Name& zone_name,
const Name& name,
const RRClass& clas,
- const RRType& type) = 0;
+ const RRType& type) const = 0;
//
// optional 'low-level' methods, an implementation may overwrite these,
Modified: branches/parkinglot/src/bin/parkinglot/data_source_plot.cc
==============================================================================
--- branches/parkinglot/src/bin/parkinglot/data_source_plot.cc (original)
+++ branches/parkinglot/src/bin/parkinglot/data_source_plot.cc Wed Jan 27 05:06:46 2010
@@ -69,7 +69,8 @@
DataSourceParkingLot::findRRsets(const isc::dns::Name& zone_name,
const isc::dns::Name& name,
const isc::dns::RRClass& clas,
- const isc::dns::RRType& type) {
+ const isc::dns::RRType& type) const
+{
SearchResult result;
Name authors_name("authors.bind");
Name version_name("version.bind");
@@ -153,7 +154,7 @@
const Name& zone_name,
const Name& name,
const RRClass& clas,
- const RRType& type)
+ const RRType& type) const
{
SearchResult result = findRRsets(zone_name, name, clas, type);
BOOST_FOREACH(RRsetPtr rrset, result) {
Modified: branches/parkinglot/src/bin/parkinglot/data_source_plot.h
==============================================================================
--- branches/parkinglot/src/bin/parkinglot/data_source_plot.h (original)
+++ branches/parkinglot/src/bin/parkinglot/data_source_plot.h Wed Jan 27 05:06:46 2010
@@ -47,7 +47,7 @@
SearchResult findRRsets(const isc::dns::Name& zone_name,
const isc::dns::Name& name,
const isc::dns::RRClass& clas,
- const isc::dns::RRType& type);
+ const isc::dns::RRType& type) const;
/* move these to private (or to zoneset) and the calling functions
* from parkinglot to here? */
@@ -74,7 +74,7 @@
const isc::dns::Name& zone_name,
const isc::dns::Name& name,
const isc::dns::RRClass& clas,
- const isc::dns::RRType& type);
+ const isc::dns::RRType& type) const;
private:
//
Modified: branches/parkinglot/src/bin/parkinglot/zoneset.h
==============================================================================
--- branches/parkinglot/src/bin/parkinglot/zoneset.h (original)
+++ branches/parkinglot/src/bin/parkinglot/zoneset.h Wed Jan 27 05:06:46 2010
@@ -43,11 +43,11 @@
elements.clear();
}
- bool contains(const std::string& s) {
+ bool contains(const std::string& s) const {
return contains(isc::dns::Name(s));
}
- bool contains(const isc::dns::Name& n) {
+ bool contains(const isc::dns::Name& n) const {
return (elements.find(n) != elements.end());
}
More information about the bind10-changes
mailing list