SwatDB
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
#pragma once
11
16
#include <string>
17
#include <vector>
18
#include <mutex>
19
#include "
swatdb_types.h
"
20
#include "
file.h
"
//for inheritance
21
22
class
HeapPage
;
23
class
HeapFile
;
24
31
class
HeapFileScanner
{
32
33
public
:
34
44
HeapFileScanner
(
HeapFile
*
file
);
45
52
~HeapFileScanner
();
53
74
RecordId
getNext
(
Record
* record);
75
76
private
:
77
82
BufferManager
*
buf_mgr
;
83
87
PageId
cur_pid
;
88
92
HeapPage
*
cur_page
;
93
98
HeapPageScanner
*
scanner
;
99
103
HeapFile
*
file
;
104
109
bool
end_of_full
;
110
115
bool
end_of_free
;
116
};
117
HeapFileScanner::HeapFileScanner
HeapFileScanner(HeapFile *file)
Constructor.
HeapFileScanner::cur_page
HeapPage * cur_page
Definition:
heapfilescanner.h:92
HeapFileScanner::end_of_full
bool end_of_full
Definition:
heapfilescanner.h:109
RecordId
Definition:
swatdb_types.h:66
HeapFileScanner
Definition:
heapfilescanner.h:31
HeapFileScanner::buf_mgr
BufferManager * buf_mgr
Definition:
heapfilescanner.h:82
file.h
HeapFileScanner::getNext
RecordId getNext(Record *record)
Returns RecordId of the next Record in the HeapFile and initializes the given Record object to the da...
HeapPage
Definition:
heappage.h:89
HeapFileScanner::end_of_free
bool end_of_free
Definition:
heapfilescanner.h:115
BufferManager
Definition:
bufmgr.h:248
PageId
Definition:
swatdb_types.h:50
swatdb_types.h
Record
Definition:
record.h:28
HeapFileScanner::file
HeapFile * file
Definition:
heapfilescanner.h:103
HeapFile
Definition:
heapfile.h:71
HeapFileScanner::scanner
HeapPageScanner * scanner
Definition:
heapfilescanner.h:98
HeapFileScanner::cur_pid
PageId cur_pid
Definition:
heapfilescanner.h:87
HeapFileScanner::~HeapFileScanner
~HeapFileScanner()
Destructor.
HeapPageScanner
Definition:
heappagescanner.h:31
Generated by
1.8.13