Summary Files Commits Branches @commit @diff @stats
path: root / Year 1 / Object-oriented Programming / Exam 2 / ex2 / Event.h
blob: a02f60c138e1dc1adff8bbc17f1db0079391ac7c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef HEADER_EVENT
#define HEADER_EVENT

class Event {
	unsigned startTime;
	unsigned endTime;

protected:
	void setStartTime(unsigned startTime);
	void setEndTime(unsigned endTime);

public:
	Event(unsigned startTime, unsigned endTime);
	virtual bool isHappeningAt(unsigned time) const;

	virtual Event* clone() const = 0;
	virtual ~Event() = default;
};

#endif