Browse Source

constified class member functions whenever possible.

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/parkinglot@559 e5f2f494-b856-4b98-b285-d166d9295462
JINMEI Tatuya 15 years ago
parent
commit
2771f5516a

+ 1 - 1
src/bin/parkinglot/data_source.h

@@ -91,7 +91,7 @@ public:
     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,

+ 3 - 2
src/bin/parkinglot/data_source_plot.cc

@@ -69,7 +69,8 @@ SearchResult
 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 @@ DataSourceParkingLot::addToMessage(Message& msg,
              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) {

+ 2 - 2
src/bin/parkinglot/data_source_plot.h

@@ -47,7 +47,7 @@ public:
     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 @@ public:
                                            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:
     //

+ 2 - 2
src/bin/parkinglot/zoneset.h

@@ -43,11 +43,11 @@ public:
         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());
     }