-
Notifications
You must be signed in to change notification settings - Fork 0
/
EventTime.h
48 lines (34 loc) · 927 Bytes
/
EventTime.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
41
42
43
44
45
46
47
48
#ifndef CSCI261_EVENTTIME_H
#define CSCI261_EVENTTIME_H
using namespace std;
#include <ctime>
class Person;
/*
* EventTime stores a time, the block's owner, and whether or not the time is the ending time.
*/
class EventTime
{
private:
static int nextID;
int _id;
Person *_owner;
time_t _time;
bool _isEnding;
static int getNextID();
public:
EventTime();
EventTime(Person *owner, time_t time, bool isEnding);
int getID() const;
Person *getOwner();
time_t getTime() const;
/**
* @brief Get whether the EventTime is ending (or beginning).
* @return Whether or not the EventTime is ending.
*
* If the EventTime is the second of a pair, that means it's
* ending (as opposed to beginning). This will return true
* if this EventTime is the ending one of the pair.
*/
bool getIsEnding() const;
};
#endif //CSCI261_EVENTTIME_H