Lucene++ - a full-featured, c++ search engine
API Documentation

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- File List
- Globals

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ChecksumIndexInput.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2011 Alan Wright. All rights reserved.
3 // Distributable under the terms of either the Apache License (Version 2.0)
4 // or the GNU Lesser General Public License.
6
7 #ifndef CHECKSUMINDEXINPUT_H
8 #define CHECKSUMINDEXINPUT_H
9
10 #include <boost/crc.hpp>
11 #include "IndexInput.h"
12
13 namespace Lucene
14 {
17 class LPPAPI ChecksumIndexInput : public IndexInput
18 {
19 public:
20 ChecksumIndexInput(IndexInputPtr main);
21 virtual ~ChecksumIndexInput();
22
23 LUCENE_CLASS(ChecksumIndexInput);
24
25 protected:
26 IndexInputPtr main;
27 boost::crc_32_type checksum;
28
29 public:
32 virtual uint8_t readByte();
33
39 virtual void readBytes(uint8_t* b, int32_t offset, int32_t length);
40
42 int64_t getChecksum();
43
45 virtual void close();
46
49 virtual int64_t getFilePointer();
50
53 virtual void seek(int64_t pos);
54
56 virtual int64_t length();
57
59 virtual LuceneObjectPtr clone(LuceneObjectPtr other = LuceneObjectPtr());
60 };
61 }
62
63 #endif

clucene.sourceforge.net