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
CompoundFileWriter.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 COMPOUNDFILEWRITER_H
8
#define COMPOUNDFILEWRITER_H
9
10
#include "
LuceneObject.h
"
11
12
namespace
Lucene {
13
27
class
CompoundFileWriter
:
public
LuceneObject
{
28
public
:
29
CompoundFileWriter
(
const
DirectoryPtr
& dir,
const
String& name,
const
CheckAbortPtr
&
checkAbort
=
CheckAbortPtr
());
30
virtual
~CompoundFileWriter
();
31
32
LUCENE_CLASS
(
CompoundFileWriter
);
33
34
protected
:
35
struct
FileEntry
{
37
String
file
;
38
40
int64_t
directoryOffset
;
41
43
int64_t
dataOffset
;
44
};
45
46
DirectoryWeakPtr
_directory
;
47
String
fileName
;
48
HashSet<String>
ids
;
49
Collection<FileEntry>
entries
;
50
bool
merged
;
51
CheckAbortPtr
checkAbort
;
52
53
public
:
55
DirectoryPtr
getDirectory
();
56
58
String
getName
();
59
62
void
addFile
(
const
String& file);
63
67
void
close
();
68
69
protected
:
72
void
copyFile
(
const
FileEntry
& source,
const
IndexOutputPtr
& os, ByteArray buffer);
73
};
74
75
}
76
77
#endif
clucene.sourceforge.net