xapian-core  2.0.0
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, see
18  * <https://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef XAPIAN_INCLUDED_REMOTE_DOCUMENT_H
22 #define XAPIAN_INCLUDED_REMOTE_DOCUMENT_H
23 
26 
30  void operator=(const RemoteDocument &);
31 
34 
36  friend class RemoteDatabase;
37 
44  std::string&& data_,
45  std::map<Xapian::valueno, std::string>&& values_)
46  : Xapian::Document::Internal(db, did_, std::move(data_),
47  std::move(values_)) {}
48 
49  protected:
51  std::string fetch_value(Xapian::valueno slot) const;
52  void fetch_all_values(std::map<Xapian::valueno,
53  std::string>& values_) const;
54  std::string fetch_data() const;
56 };
57 
58 #endif // XAPIAN_INCLUDED_REMOTE_DOCUMENT_H
RemoteDatabase is the baseclass for remote database implementations.
A document read from a RemoteDatabase.
std::string fetch_data() const
Implementation of virtual methods.
RemoteDocument(const RemoteDocument &)
Don't allow copying.
RemoteDocument(const Xapian::Database::Internal *db, Xapian::docid did_, std::string &&data_, std::map< Xapian::valueno, std::string > &&values_)
Private constructor - only called by RemoteDatabase::open_document().
void operator=(const RemoteDocument &)
Don't allow assignment.
std::string fetch_value(Xapian::valueno slot) const
Implementation of virtual methods.
void fetch_all_values(std::map< Xapian::valueno, std::string > &values_) const
Implementation of virtual methods.
Virtual base class for Database internals.
Abstract base class for a document.
Internal()
Construct an empty document.
Virtual base class for Database internals.
Abstract base class for a document.
The Xapian namespace contains public interfaces for the Xapian library.
Definition: compactor.cc:82
unsigned valueno
The number for a value slot in a document.
Definition: types.h:90
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
Definition: types.h:51