src/graph/example/WordCount.h

00001 #ifndef _HT_EXAMPLE_WORDCOUNT_H
00002 #define _HT_EXAMPLE_WORDCOUNT_H
00003 
00004 #include <graph/example/WordParser.h>
00005 
00006 namespace ht {
00007     namespace example {
00008         class FileWriter;
00012         class WordCount : public WordReader
00013         {
00014             int words_, lines_, bytes_;
00015             FileWriter * next_;
00016         public:
00017             WordCount() : words_(0), lines_(0), bytes_(0), next_(0) {}
00018             void process(const WordBuffer & buf);
00019             void connect(ht::graph::Node *next);
00023             void stop();
00025             int words() { return words_; }
00027             int lines() { return lines_; }
00029             int bytes() { return bytes_; }
00030         };
00031     }
00032 }
00033 #endif

Generated on Thu Jan 3 15:26:45 2008 by  doxygen 1.5.2