xapian-core  1.4.27
remote-document.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2008,2011 Olly Betts
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of the
9  * License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef XAPIAN_INCLUDED_REMOTE_DOCUMENT_H
22 #define XAPIAN_INCLUDED_REMOTE_DOCUMENT_H
23 
24 #include "backends/database.h"
25 #include "backends/document.h"
26 
30  void operator=(const RemoteDocument &);
31 
34 
36  friend class RemoteDatabase;
37 
44  const string & data_,
45  map<Xapian::valueno, string> &values_)
46  : Xapian::Document::Internal(db, did_)
47  {
48  set_data(data_);
49  set_all_values(values_);
50  }
51 
52  public:
54  string do_get_value(Xapian::valueno slot) const;
55  void do_get_all_values(map<Xapian::valueno, string> & values_) const;
56  string do_get_data() const;
58 };
59 
60 #endif // XAPIAN_INCLUDED_REMOTE_DOCUMENT_H
The Xapian namespace contains public interfaces for the Xapian library.
Definition: compactor.cc:80
void operator=(const RemoteDocument &)
Don&#39;t allow assignment.
void set_data(const string &)
Definition: omdocument.cc:422
RemoteDocument(const RemoteDocument &)
Don&#39;t allow copying.
Base class for databases.
Definition: database.h:57
A document in the database, possibly plus modifications.
Definition: document.h:43
RemoteDocument(const Xapian::Database::Internal *db, Xapian::docid did_, const string &data_, map< Xapian::valueno, string > &values_)
Private constructor - only called by RemoteDocument::open_document().
void set_all_values(map< Xapian::valueno, string > &values_)
Set all the values.
Definition: document.h:124
RemoteDatabase is the baseclass for remote database implementations.
string do_get_value(Xapian::valueno slot) const
Implementation of virtual methods.
void do_get_all_values(map< Xapian::valueno, string > &values_) const
Implementation of virtual methods.
string do_get_data() const
Implementation of virtual methods.
unsigned valueno
The number for a value slot in a document.
Definition: types.h:108
A document read from a RemoteDatabase.
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
Definition: types.h:52