Joshua
open source statistical hierarchical phrase-based machine translation system
|
00001 #ifndef UTIL_STREAM_LINE_INPUT_H 00002 #define UTIL_STREAM_LINE_INPUT_H 00003 namespace util {namespace stream { 00004 00005 class ChainPosition; 00006 00007 /* Worker that reads input into blocks, ensuring that blocks contain whole 00008 * lines. Assumes that the maximum size of a line is less than the block size 00009 */ 00010 class LineInput { 00011 public: 00012 // Takes ownership upon thread execution. 00013 explicit LineInput(int fd); 00014 00015 void Run(const ChainPosition &position); 00016 00017 private: 00018 int fd_; 00019 }; 00020 00021 }} // namespaces 00022 #endif // UTIL_STREAM_LINE_INPUT_H