ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Tree-M/MT/MTfile.h
Revision: 1.1
Committed: Sun May 6 00:45:52 2001 UTC (23 years, 1 month ago) by root
Content type: text/plain
Branch: MAIN
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 /*********************************************************************
2     * *
3     * Copyright (c) 1997,1998, 1999 *
4     * Multimedia DB Group and DEIS - CSITE-CNR, *
5     * University of Bologna, Bologna, ITALY. *
6     * *
7     * All Rights Reserved. *
8     * *
9     * Permission to use, copy, and distribute this software and its *
10     * documentation for NON-COMMERCIAL purposes and without fee is *
11     * hereby granted provided that this copyright notice appears in *
12     * all copies. *
13     * *
14     * THE AUTHORS MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE *
15     * SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING *
16     * BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, *
17     * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. THE AUTHOR *
18     * SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A *
19     * RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS *
20     * DERIVATIVES. *
21     * *
22     *********************************************************************/
23    
24     #ifndef MTFILE_H
25     #define MTFILE_H
26    
27     #include "GiSTstore.h"
28    
29     // MTfile is a simple storage class for GiSTs to work over
30     // UNIX/NT files. It is a copy of the GiSTfile class.
31    
32     class MTfile: public GiSTstore {
33     public:
34     MTfile(): GiSTstore() {}
35    
36     void Create(const char *filename);
37     void Open(const char *filename);
38     void Close();
39    
40     void Read(GiSTpage page, char *buf);
41     void Write(GiSTpage page, const char *buf);
42     GiSTpage Allocate();
43     void Deallocate(GiSTpage page);
44     void Sync() {}
45     // int PageSize() const { return 65536; }
46     int PageSize() const { return 4096; }
47    
48     private:
49     int fileHandle;
50     };
51    
52     #endif