1 | // Mode: -*- C++ -*- |
1 | // Mode: -*- C++ -*- |
2 | |
2 | |
3 | // GiSTfile.h |
3 | // GiSTfile.h |
4 | // |
4 | // |
5 | // Copyright (c) 1996, Regents of the University of California |
5 | // Copyright (c) 1996, Regents of the University of California |
6 | // $Header: /schmorpforge/Tree-M/GiST/GiSTfile.h,v 1.1 2001/05/06 00:45:52 root Exp $ |
6 | // $Header: /schmorpforge/Tree-M/GiST/GiSTfile.h,v 1.2 2001/05/23 02:11:14 root Exp $ |
7 | |
7 | |
8 | #ifndef GISTFILE_H |
8 | #ifndef GISTFILE_H |
9 | #define GISTFILE_H |
9 | #define GISTFILE_H |
10 | |
10 | |
11 | #include "GiSTstore.h" |
11 | #include "GiSTstore.h" |
… | |
… | |
15 | |
15 | |
16 | class GiSTfile: public GiSTstore { |
16 | class GiSTfile: public GiSTstore { |
17 | public: |
17 | public: |
18 | GiSTfile(): GiSTstore() {} |
18 | GiSTfile(): GiSTstore() {} |
19 | |
19 | |
20 | void Create(const char *filename); |
20 | virtual void Create(const char *filename); |
21 | void Open(const char *filename); |
21 | virtual void Open(const char *filename); |
22 | void Close(); |
22 | virtual void Close(); |
23 | |
23 | |
24 | void Read(GiSTpage page, char *buf); |
24 | virtual void Read(GiSTpage page, char *buf); |
25 | void Write(GiSTpage page, const char *buf); |
25 | virtual void Write(GiSTpage page, const char *buf); |
26 | GiSTpage Allocate(); |
26 | virtual GiSTpage Allocate(); |
27 | void Deallocate(GiSTpage page); |
27 | virtual void Deallocate(GiSTpage page); |
28 | void Sync() {} |
28 | //virtual void Sync() {} |
29 | int PageSize() const { return 4096; } |
29 | //virtual int PageSize() const { return 4096; } |
30 | |
30 | |
31 | private: |
31 | private: |
32 | int fileHandle; |
32 | int fileHandle; |
33 | }; |
33 | }; |
34 | |
34 | |