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

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

- File List
- Globals

RAMFile.h
Go to the documentation of this file.
1 // 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 RAMFILE_H
8 #define RAMFILE_H
9
10 #include "LuceneObject.h"
11
12 namespace Lucene {
13
15 class LPPAPI RAMFile : public LuceneObject {
16 public:
17 RAMFile(); // File used as buffer, in no RAMDirectory
18 RAMFile(const RAMDirectoryPtr& directory);
19 virtual ~RAMFile();
20
21 LUCENE_CLASS(RAMFile);
22
23 INTERNAL:
24 int64_t length;
25 RAMDirectoryWeakPtr _directory;
26
27 protected:
28 Collection<ByteArray> buffers;
29
30 int64_t sizeInBytes;
31
33 int64_t lastModified;
34
35 public:
37 int64_t getLength();
38 void setLength(int64_t length);
39
41 int64_t getLastModified();
42 void setLastModified(int64_t lastModified);
43
44 int64_t getSizeInBytes();
45
46 ByteArray addBuffer(int32_t size);
47 ByteArray getBuffer(int32_t index);
48 int32_t numBuffers();
49
50 protected:
52 virtual ByteArray newBuffer(int32_t size);
53 };
54
55 }
56
57 #endif
Lucene::RAMFile::lastModified
int64_t lastModified
This is publicly modifiable via Directory.touchFile(), so direct access not supported.
Definition: RAMFile.h:33
LuceneObject.h
Lucene::RAMDirectoryWeakPtr
boost::weak_ptr< RAMDirectory > RAMDirectoryWeakPtr
Definition: LuceneTypes.h:505
Lucene::RAMDirectoryPtr
boost::shared_ptr< RAMDirectory > RAMDirectoryPtr
Definition: LuceneTypes.h:505
Lucene::RAMFile
File used as buffer in RAMDirectory.
Definition: RAMFile.h:15
Lucene::LuceneObject
Base class for all Lucene classes.
Definition: LuceneObject.h:31
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::RAMFile::sizeInBytes
int64_t sizeInBytes
Definition: RAMFile.h:30
Lucene::Collection< ByteArray >
Lucene::RAMFile::_directory
RAMDirectoryWeakPtr _directory
Definition: RAMFile.h:25
Lucene::RAMFile::buffers
Collection< ByteArray > buffers
Definition: RAMFile.h:28

clucene.sourceforge.net