00001 /* net_document.h: C++ class definition for accessing a net document 00002 * 00003 * Copyright 1999,2000,2001 BrightStation PLC 00004 * Copyright 2002 Ananova Ltd 00005 * Copyright 2003,2006 Olly Betts 00006 * 00007 * This program is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU General Public License as 00009 * published by the Free Software Foundation; either version 2 of the 00010 * License, or (at your option) any later version. 00011 * 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the Free Software 00019 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 00020 * USA 00021 */ 00022 00023 #ifndef OM_HGUARD_NET_DOCUMENT_H 00024 #define OM_HGUARD_NET_DOCUMENT_H 00025 00026 #include "document.h" 00027 00028 class NetworkDocument : public Xapian::Document::Internal { 00029 friend class RemoteDatabase; 00030 private: 00031 string doc; 00032 00033 map<Xapian::valueno, string> values; 00034 00035 NetworkDocument(const Xapian::Database::Internal *database_, Xapian::docid did_, 00036 const string & doc_, 00037 const map<Xapian::valueno, string> &values_); 00038 00039 // Stop copying 00040 NetworkDocument(const NetworkDocument &); 00041 NetworkDocument & operator = (const NetworkDocument &); 00042 public: 00043 string do_get_value(Xapian::valueno valueid) const; 00044 map<Xapian::valueno, string> do_get_all_values() const; 00045 string do_get_data() const; 00046 }; 00047 00048 #endif /* OM_HGUARD_NET_DOCUMENT_H */