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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
RAMFile.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 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 
22 
23 INTERNAL:
24  int64_t length;
26 
27 protected:
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

clucene.sourceforge.net