00001 /*========================================================================== 00002 * Copyright (c) 2001 Carnegie Mellon University. All Rights Reserved. 00003 * 00004 * Use of the Lemur Toolkit for Language Modeling and Information Retrieval 00005 * is subject to the terms of the software license set forth in the LICENSE 00006 * file included with this software, and also available at 00007 * http://www.lemurproject.org/license.html 00008 * 00009 *========================================================================== 00010 */ 00011 00012 #include "TextHandler.hpp" 00013 00014 #include <fstream> 00015 #include "common_headers.hpp" 00016 00017 #ifndef _WRITERINQUERYHANDLER_HPP 00018 #define _WRITERINQUERYHANDLER_HPP 00019 00026 00027 00028 class WriterInQueryHandler : public TextHandler { 00029 00030 public: 00031 00033 WriterInQueryHandler(const string &filename); 00034 ~WriterInQueryHandler(); 00035 00037 char * handleDoc(char * docno); 00039 char * handleWord(char * word); 00041 char * handleSymbol(char * sym); 00042 00043 00044 private: 00046 void endDoc(); 00047 00049 bool first; 00050 00052 ofstream * outfile; 00053 }; 00054 00055 #endif