00001 /* ClientXMLDocument.h $Revision: 1.2 $ $Date: 2005/12/10 20:33:54 $ 00002 Copyright (C) 1999 University of Bonn. 00003 http://www.ikp.uni-bonn.de/boss 00004 00005 This program is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU General Public License 00007 as published by the Free Software Foundation; either version 2 00008 of the License, or (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License 00016 along with this program; if not, write to the Free Software 00017 Foundation, Inc., 59 Temple Place - Suite 330, 00018 Boston, MA 02111-1307, USA. 00019 */ 00020 00026 #ifndef CLIENT_XML_DOCUMENT_H 00027 #define CLIENT_XML_DOCUMENT_H 00028 00029 using namespace std; 00030 00031 #include <fstream> 00032 #include <sstream> 00033 #include "Token.h" 00034 #include "boss_utility/commandline.h" 00035 00036 // ClientXMLDocument is a class representing the XML document created in the 00037 // BOSS client. In current state it is only a wrapper to the original BOSS 00038 // client code. 00039 // The XML document is created from a phrases of parsed words stored in phrases 00040 // object. The XML is internally stored in a stringstream object from which 00041 // its is read and sent by the net code. 00042 00051 class ClientXMLDocument { 00052 ostringstream outs; 00053 BOSS::CommandLine & cl; 00054 00055 protected: 00056 void phraseToXML(const Phrase & phrase); 00057 00058 public: 00059 ClientXMLDocument(BOSS::CommandLine & config, const Phrases & phrases); 00060 ostringstream & getStringStream() { 00061 return outs; 00062 } 00063 00064 }; 00065 // end of boss_client group 00067 #endif 00068