- Timestamp:
- Jul 24, 2010, 5:05:34 AM (11 years ago)
- Location:
- trunk/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Configuration.cc
r1136 r1143 27 27 #include "Functor.h" 28 28 29 #include <algorithm> 29 30 #include <cassert> 30 31 #include <fstream> … … 109 110 110 111 111 bool Configuration::equal_false( const std::string&str) const112 { 113 return str=="false" || str=="False" || str=="FALSE" ||114 str=="no" || str=="No" || str=="NO";115 } 116 117 118 bool Configuration::equal_true( const std::string&str) const119 { 120 return str=="true" || str=="True" || str=="TRUE" ||121 str=="yes" || str=="Yes" || str=="YES";112 bool Configuration::equal_false(std::string str) const 113 { 114 transform(str.begin(), str.end(), str.begin(), tolower); 115 return str=="false" || str=="no" || str=="off" || str=="0"; 116 } 117 118 119 bool Configuration::equal_true(std::string str) const 120 { 121 transform(str.begin(), str.end(), str.begin(), tolower); 122 return str=="true" || str=="yes" || str=="on" || str=="1"; 122 123 } 123 124 -
trunk/lib/Configuration.h
r1136 r1143 140 140 void clear(void); 141 141 const std::pair<std::string,std::string>* dictionary(std::string lhs) const; 142 bool equal_false( const std::string&) const;143 bool equal_true( const std::string&) const;142 bool equal_false(std::string) const; 143 bool equal_true(std::string) const; 144 144 /// 145 145 /// @brief load deafult configuration
Note: See TracChangeset
for help on using the changeset viewer.