Website Summary Files Commits Branches @commit @diff @stats
path: root / Utils / k_2_SI / task2 / Event / Event.h
blob: f3a5c182034c6ed2a4c9402757402e7445f91abf (plain) (blame)
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
#pragma once
#include "../Time/Time.h"
class Event
{

public:
	enum class EventType
	{
		typeA,
		typeB,
		typeC
	};

protected:
	Time start;
	Time end;

	EventType type;
public:


	Event(EventType type, size_t sHours, size_t sMins, size_t eHours, size_t eMins) : type(type), start(sHours, sMins), end(eHours, eMins){}
	virtual ~Event() = default;

	virtual bool duringTime(const Time& time) const = 0;
	virtual Time getLength() const = 0;
	virtual Event* clone() const = 0;

	EventType getType() const { return type; }
};