ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/io/ParamConstraint.hpp
(Generate patch)

Comparing trunk/OOPSE-4/src/io/ParamConstraint.hpp (file contents):
Revision 2371 by tim, Fri Oct 14 21:43:13 2005 UTC vs.
Revision 2372 by tim, Mon Oct 17 00:51:16 2005 UTC

# Line 42 | Line 42
42   #ifndef IO_PARAMCONSTRAINT_HPP
43   #define IO_PARAMCONSTRAINT_HPP
44   #include <sstream>
45 <
45 > #include "utils/CaseConversion.hpp"
46   /**
47    * This class allows to recognize constraint predicates, so that they can be combined using
48    * composition operators. Every constraint predicate must be derived from this class
# Line 169 | Line 169 | struct EqualIgnoreCaseConstraint : public ParamConstra
169  
170   struct EqualIgnoreCaseConstraint : public ParamConstraintFacade<EqualIgnoreCaseConstraint> {
171      
172 <    EqualIgnoreCaseConstraint(std::string rhs) : rhs_(rhs){
172 >    EqualIgnoreCaseConstraint(std::string rhs) : rhs_(oopse::toUpperCopy(rhs)){
173          std::stringstream iss;
174          iss << "equal to (case insensitive) " << rhs;
175          description_ = iss.str();
176      }
177      
178      bool operator()( std::string data ) const {
179 <        return data == rhs_;
179 >        return oopse::toUpperCopy(data) == rhs_;
180      }
181      
182      private:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines