Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Examples  

word.h

Go to the documentation of this file.
00001 #ifndef WORD_H
00002 #define WORD_H
00003 
00004 // $Id: word.h,v 1.1.1.1 2002/03/24 12:37:04 dvermeir Exp $
00005 #include <string>
00006 #include <iostream>
00007 #include <stdexcept>
00008 
00014 class Word {
00015 public:
00020   Word(const string& w="");
00024   operator string() const { return w_; }
00028   const string& str() const { return w_; }
00036   friend istream&
00037     operator>>(istream&, Word& w);
00038   friend bool
00039     operator==(const Word& w1, const Word& w2) { return w1.w_ == w2.w_; }
00040   friend bool
00041     operator<(const Word& w1, const Word& w2) { return w1.w_ < w2.w_; }
00045 private:
00046   string w_;
00047 };
00048 
00049 #endif
00050 

textindexer-0.2 [27 March, 2002]