Branch data Line data Source code
1 : : /* flint_document.h: Document from a Flint Database
2 : : *
3 : : * Copyright 1999,2000,2001 BrightStation PLC
4 : : * Copyright 2002 Ananova Ltd
5 : : * Copyright 2002,2003,2004,2008 Olly Betts
6 : : *
7 : : * This program is free software; you can redistribute it and/or
8 : : * modify it under the terms of the GNU General Public License as
9 : : * published by the Free Software Foundation; either version 2 of the
10 : : * License, or (at your option) any later version.
11 : : *
12 : : * This program is distributed in the hope that it will be useful,
13 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 : : * GNU General Public License for more details.
16 : : *
17 : : * You should have received a copy of the GNU General Public License
18 : : * along with this program; if not, write to the Free Software
19 : : * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
20 : : * USA
21 : : */
22 : :
23 : : #ifndef OM_HGUARD_FLINT_DOCUMENT_H
24 : : #define OM_HGUARD_FLINT_DOCUMENT_H
25 : :
26 : : #include <xapian/base.h>
27 : : #include "document.h"
28 : :
29 : : class FlintDatabase;
30 : : class FlintValueTable;
31 : : class FlintRecordTable;
32 : :
33 : : /// A document from a Flint format database
34 [ + - ][ # # ]: 285687 : class FlintDocument : public Xapian::Document::Internal {
35 : : friend class FlintDatabase;
36 : : friend class FlintWritableDatabase;
37 : : private:
38 : : Xapian::Internal::RefCntPtr<const Xapian::Database::Internal> database;
39 : :
40 : : const FlintValueTable *value_table;
41 : : const FlintRecordTable *record_table;
42 : :
43 : : FlintDocument(Xapian::Internal::RefCntPtr<const Xapian::Database::Internal> database_,
44 : : const FlintValueTable *value_table_,
45 : : const FlintRecordTable *record_table_,
46 : : Xapian::docid did_, bool lazy);
47 : :
48 : : // Prevent copying
49 : : FlintDocument(const FlintDocument &);
50 : : FlintDocument & operator = (const FlintDocument &);
51 : : public:
52 : : string do_get_value(Xapian::valueno valueid) const;
53 : : void do_get_all_values(map<Xapian::valueno, string> & values_) const;
54 : : string do_get_data() const;
55 : : };
56 : :
57 : : #endif /* OM_HGUARD_FLINT_DOCUMENT_H */
|