| 1 |
root |
1.1 |
// Mode: -*- C++ -*- |
| 2 |
|
|
|
| 3 |
|
|
// GiSTfile.h |
| 4 |
|
|
// |
| 5 |
|
|
// Copyright (c) 1996, Regents of the University of California |
| 6 |
|
|
// $Header: /usr/local/devel/GiST/libGiST/libGiST/GiSTfile.h,v 1.1.1.1 1996/08/06 23:47:21 jmh Exp $ |
| 7 |
|
|
|
| 8 |
|
|
#ifndef GISTFILE_H |
| 9 |
|
|
#define GISTFILE_H |
| 10 |
|
|
|
| 11 |
|
|
#include "GiSTstore.h" |
| 12 |
|
|
|
| 13 |
|
|
// GiSTfile is a simple storage class for GiSTs to work over |
| 14 |
|
|
// UNIX/NT files. |
| 15 |
|
|
|
| 16 |
|
|
class GiSTfile: public GiSTstore { |
| 17 |
|
|
public: |
| 18 |
|
|
GiSTfile(): GiSTstore() {} |
| 19 |
|
|
|
| 20 |
|
|
void Create(const char *filename); |
| 21 |
|
|
void Open(const char *filename); |
| 22 |
|
|
void Close(); |
| 23 |
|
|
|
| 24 |
|
|
void Read(GiSTpage page, char *buf); |
| 25 |
|
|
void Write(GiSTpage page, const char *buf); |
| 26 |
|
|
GiSTpage Allocate(); |
| 27 |
|
|
void Deallocate(GiSTpage page); |
| 28 |
|
|
void Sync() {} |
| 29 |
|
|
int PageSize() const { return 4096; } |
| 30 |
|
|
|
| 31 |
|
|
private: |
| 32 |
|
|
int fileHandle; |
| 33 |
|
|
}; |
| 34 |
|
|
|
| 35 |
|
|
#endif |