xapian-core  2.0.0
glass_document.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2008,2009,2010,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_GLASS_DOCUMENT_H
22 #define XAPIAN_INCLUDED_GLASS_DOCUMENT_H
23 
24 #include "glass_docdata.h"
25 #include "glass_values.h"
28 
32  void operator=(const GlassDocument &);
33 
36 
39 
42 
44  friend class GlassDatabase;
45 
48  Xapian::docid did_,
49  const GlassValueManager *value_manager_,
50  const GlassDocDataTable *docdata_table_)
51  : Xapian::Document::Internal(db, did_),
52  value_manager(value_manager_), docdata_table(docdata_table_) { }
53 
54  protected:
56  string fetch_value(Xapian::valueno slot) const;
57  void fetch_all_values(std::map<Xapian::valueno,
58  std::string>& values_) const;
59  string fetch_data() const;
61 };
62 
63 #endif // XAPIAN_INCLUDED_GLASS_DOCUMENT_H
A backend designed for efficient indexing and retrieval, using compressed posting lists and a btree s...
A document read from a GlassDatabase.
GlassDocument(Xapian::Internal::intrusive_ptr< const Xapian::Database::Internal > db, Xapian::docid did_, const GlassValueManager *value_manager_, const GlassDocDataTable *docdata_table_)
Private constructor - only called by GlassDatabase::open_document().
const GlassDocDataTable * docdata_table
Used for lazy access to document data.
const GlassValueManager * value_manager
Used for lazy access to document values.
void operator=(const GlassDocument &)
Don't allow assignment.
string fetch_value(Xapian::valueno slot) const
Implementation of virtual methods.
string fetch_data() const
Implementation of virtual methods.
GlassDocument(const GlassDocument &)
Don't allow copying.
void fetch_all_values(std::map< Xapian::valueno, std::string > &values_) const
Implementation of virtual methods.
Abstract base class for a document.
Internal()
Construct an empty document.
Virtual base class for Database internals.
Abstract base class for a document.
Subclass of GlassTable which holds document data.
GlassValueManager class.
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