forked from psi46/psi46test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
waferlist.h
40 lines (32 loc) · 806 Bytes
/
waferlist.h
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
32
33
34
35
36
37
38
39
40
// waferlist.h
#ifndef WAFERLIST_H
#define WAFERLIST_H
#include <string>
#include <list>
class CWaferId
{
std::string id;
bool tested;
std::string timestamp; // JJJJMMDDhhmm
public:
bool Read(FILE *f);
void Write(FILE *f);
void SetTested();
bool IsId(const std::string &waferId) { return id == waferId; }
bool IsTested() { return tested; }
const std::string& GetId() { return id; }
};
class CWaferList
{
bool modified;
std::list<CWaferId>::iterator current;
public:
CWaferList() : modified(false), current(wafer.end()) {}
bool Read(const std::string &fileName);
void Write(const std::string &fileName);
int SelectWafer(const std::string &waferId); // 0 = ok, 1 = not existing, 2 = already tested
void SetTested();
const std::string& GetId();
std::list<CWaferId> wafer;
};
#endif