SwatDB
Loading...
Searching...
No Matches
include
heapfilescanner.h
Go to the documentation of this file.
1
/*
2
* SwatDB
3
*
4
* @authors: See Contributors.doc for code contributors
5
*
6
* Copyright (c) 2020 Swarthmore College Computer Science Department
7
* Swarthmore PA, Professors Tia Newhall, Ameet Soni
8
*/
9
10
#ifndef _SWATDB_HEAPFILESCANNER_H_
11
#define _SWATDB_HEAPFILESCANNER_H_
12
13
// @@@@ SWATDB_ASSIGNMENT: ADDTODODATE
14
15
20
#include <string>
21
#include <vector>
22
#include <mutex>
23
#include "
swatdb_types.h
"
24
#include "
file.h
"
//for inheritance
25
26
class
HeapPage
;
27
class
HeapFile
;
28
class
Record
;
29
class
HeapPageScanner
;
30
31
// @@@@ SWATDB_ASSIGNMENT: NOTEMSG DO NOT modify this class other than adding
32
// @@@@ SWATDB_ASSIGNMENT: NOTEMSG private helper methods for good design
39
class
HeapFileScanner
{
40
41
public
:
42
52
HeapFileScanner
(
HeapFile
*
file
);
53
60
~HeapFileScanner
();
61
82
RecordId
getNext
(
Record
* record);
83
84
private
:
85
90
BufferManager
*
buf_mgr
;
91
95
PageId
cur_pid
;
96
100
HeapPage
*
cur_page
;
101
106
HeapPageScanner
*
scanner
;
107
111
HeapFile
*
file
;
112
117
bool
end_of_full
;
118
123
bool
end_of_free
;
124
};
125
126
127
#endif
BufferManager
Definition
bufmgr.h:121
HeapFileScanner
Definition
heapfilescanner.h:39
HeapFileScanner::cur_pid
PageId cur_pid
Definition
heapfilescanner.h:95
HeapFileScanner::HeapFileScanner
HeapFileScanner(HeapFile *file)
Constructor.
HeapFileScanner::cur_page
HeapPage * cur_page
Definition
heapfilescanner.h:100
HeapFileScanner::scanner
HeapPageScanner * scanner
Definition
heapfilescanner.h:106
HeapFileScanner::getNext
RecordId getNext(Record *record)
Returns RecordId of the next Record in the HeapFile and initializes the given Record object to the da...
HeapFileScanner::buf_mgr
BufferManager * buf_mgr
Definition
heapfilescanner.h:90
HeapFileScanner::end_of_full
bool end_of_full
Definition
heapfilescanner.h:117
HeapFileScanner::file
HeapFile * file
Definition
heapfilescanner.h:111
HeapFileScanner::~HeapFileScanner
~HeapFileScanner()
Destructor.
HeapFileScanner::end_of_free
bool end_of_free
Definition
heapfilescanner.h:123
HeapFile
Definition
heapfile.h:76
HeapPageScanner
Definition
heappagescanner.h:33
HeapPage
Definition
heappage.h:94
Record
Definition
record.h:34
file.h
PageId
Definition
swatdb_types.h:54
RecordId
Definition
swatdb_types.h:70
swatdb_types.h
Generated by
1.9.8