// SuffixList03.h // tom bailey 9 mar 06 // Declare the SuffixList class. // ver 1: constructor from string, unsorted // display // tom bailey 17 mar 06 // ver 2: constructor of sorted, thus true, suffix list. // tom bailey 20 mar 06 // ver 3: find suffix pair with longest prefix match. #if ! defined( SUFFIXLIST_H_ ) #define SUFFIXLIST_H_ #include #include #include #include "StringSegment03.h" #include class SuffixList { public: SuffixList( const std::string & ); std::pair longestMatch() const; void write( std::ostream &, size_t limit = -1, std::string term = "\n" ) const; private: std::vector< StringSegment > theList; }; std::ostream & operator<<( std::ostream &, const SuffixList & ); #endif