root / tags / 1.0.8 / xapian-core / backends / flint / flint_document.h

Revision 8160, 1.9 kB (checked in by olly, 21 months ago)

* ./: svn:eol-style not svn:eolstyle.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1/* flint_document.h: Document from a Flint Database
2 *
3 * ----START-LICENCE----
4 * Copyright 1999,2000,2001 BrightStation PLC
5 * Copyright 2002 Ananova Ltd
6 * Copyright 2002,2003,2004 Olly Betts
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21 * USA
22 * -----END-LICENCE-----
23 */
24
25#ifndef OM_HGUARD_FLINT_DOCUMENT_H
26#define OM_HGUARD_FLINT_DOCUMENT_H
27
28#include <xapian/base.h>
29#include "document.h"
30
31class FlintDatabase;
32
33/// A document from a Flint format database
34class 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        ~FlintDocument();
53
54        string do_get_value(Xapian::valueno valueid) const;
55        map<Xapian::valueno, string> do_get_all_values() const;
56        string do_get_data() const;
57};
58
59#endif /* OM_HGUARD_FLINT_DOCUMENT_H */
Note: See TracBrowser for help on using the browser.