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
include
ChecksumIndexInput.h
Go to the documentation of this file.
1
2
// Copyright (c) 2009-2014 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
public
:
19
ChecksumIndexInput
(
const
IndexInputPtr
& main);
20
virtual
~
ChecksumIndexInput
();
21
22
LUCENE_CLASS
(
ChecksumIndexInput
);
23
24
protected
:
25
IndexInputPtr
main;
26
boost::crc_32_type
checksum
;
27
28
public
:
31
virtual
uint8_t readByte();
32
38
virtual
void
readBytes(uint8_t* b, int32_t offset, int32_t length);
39
41
int64_t getChecksum();
42
44
virtual
void
close();
45
48
virtual
int64_t getFilePointer();
49
52
virtual
void
seek(int64_t pos);
53
55
virtual
int64_t length();
56
58
virtual
LuceneObjectPtr
clone(
const
LuceneObjectPtr
& other =
LuceneObjectPtr
());
59
};
60
61
}
62
63
#endif
clucene.sourceforge.net