/* * DummyValidator.hpp * * Created on: Apr 13, 2012 * Author: ankele */ #ifndef DUMMYVALIDATOR_HPP_ #define DUMMYVALIDATOR_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include "Validator.hpp" /** A validator test that always passes. * */ template class DummyValidator : public Validator { public: DummyValidator(){}; virtual ~DummyValidator() {}; bool isValid(const T & _value) const { return true; } Validator* clone() const { return new DummyValidator; }; // comparator bool operator==(const Validator &_instance) const { const DummyValidator *inst = dynamic_cast *>(&_instance); if (inst) return true; return false; }; }; #endif /* DUMMYVALIDATOR_HPP_ */