-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathScan.h
More file actions
31 lines (28 loc) · 623 Bytes
/
Copy pathScan.h
File metadata and controls
31 lines (28 loc) · 623 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "Iterator.h"
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
class ScanPlan : public Plan
{
friend class ScanIterator;
public:
ScanPlan (char const * const name, RowCount const count);
~ScanPlan ();
Iterator * init () const;
private:
RowCount const _count;
mutable ifstream _file;
mutable string _currentLine;
}; // class ScanPlan
class ScanIterator : public Iterator
{
public:
ScanIterator (ScanPlan const * const plan);
~ScanIterator ();
bool next (Row & row);
void free (Row & row);
private:
ScanPlan const * const _plan;
RowCount _count;
}; // class ScanIterator