SwatDB
heappagescanner.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 <cstddef>
17 #include <mutex>
18 #include "swatdb_types.h"
19 #include "page.h"
20 
21 class Data;
22 
26 class HeapPage;
27 
32 
33  public:
34 
45 
50 
63  SlotId getNext();
64 
74  void reset(HeapPage* page);
75 
76  private:
77 
83 
87  SlotId cur_slot;
88 
89 };
90 
SlotId getNext()
Returns SlotId of the next valid slot.
void reset(HeapPage *page)
Resets the scanner, so it could be used for another Page.
Definition: heappage.h:89
~HeapPageScanner()
Destructor.
HeapPageScanner(HeapPage *page)
Constructor.
SlotId cur_slot
Current slot being scanned.
Definition: heappagescanner.h:87
Definition: data.h:25
HeapPage * page
Page to be scanned. The Page is pinned outside the scope of the scanner.
Definition: heappagescanner.h:82
Definition: heappagescanner.h:31