-
Notifications
You must be signed in to change notification settings - Fork 0
/
Minute.hpp
51 lines (34 loc) · 1006 Bytes
/
Minute.hpp
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
49
50
51
#pragma once
#include "global.hpp"
#include <iosfwd>
namespace sleep
{
#ifdef RUN_TESTS
class TestResult;
#endif // #ifdef RUN_TESTS
class Hour;
class Minute
{
public:
#ifdef RUN_TESTS
static void Test(TestResult & testResult);
#endif // #ifdef RUN_TESTS
Minute(int const value);
Minute & operator =(Minute const & other);
int get() const;
bool operator ==(Minute const & rhs) const;
bool operator !=(Minute const & rhs) const;
bool operator <(Minute const & rhs) const;
bool operator >(Minute const & rhs) const;
bool operator <=(Minute const & rhs) const;
bool operator >=(Minute const & rhs) const;
Minute operator +(Minute const & rhs) const;
Minute operator -(Minute const & rhs) const;
Minute operator +(Hour const & rhs) const;
Minute operator -(Hour const & rhs) const;
Minute operator *(int const factor) const;
private:
int m_value;
};
std::ostream & operator <<(std::ostream & stream, Minute const & minute);
}