Open main menu

User:PerfektesChaos/WikidiffLX/coding/Word.h

< User:PerfektesChaos‎ | WikidiffLX‎ | coding

Separated declaration from /Word.cpp


#ifndef WORD_H
#define WORD_H

#include "WDLX_config.h"
#include <string>

class Word {
public:
   typedef std::basic_string<char, std::char_traits<char>, WDLX_ALLOCATOR<char> > String;
   typedef String::const_iterator Iterator;

   Iterator bodyStart;
   Iterator bodyEnd;
   Iterator suffixEnd;
   Word(Iterator bs, Iterator be, Iterator se);
   bool operator==(const Word &w) const;
   bool operator!=(const Word &w) const;
   bool operator<(const Word &w) const;
   operator String() const;
   String whole() const;
   void get_body(String & w) const;
   void get_whole(String & w) const;
   bool equals_suffix(const Word * w) const;
   size_t get_suffixlength() const;
};

#endif