#ifndef __FPI_HPP #define __FPI_HPP #define __RABINKARP 1 #define __KMP 2 #define __SEARCHMETHOD __KMP #include "pi.hpp" #if __SEARCHMETHOD==__RABINKARP #include "hash.hpp" #endif class fastPortingIssue : public portingIssue { #if __SEARCHMETHOD==__RABINKARP hashvalue_t hashval; #endif #if __SEARCHMETHOD==__KMP unsigned M; int *nexttable; #endif void initFast(); public: fastPortingIssue(const char *searchKeyword, const char *helpSearchKeyword, const char *issue, const char *suggestedFix) : portingIssue(searchKeyword,helpSearchKeyword,issue,suggestedFix) { initFast(); } virtual ~fastPortingIssue(); int isIn(const char *l) const; }; #endif