YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
Time.cpp
Go to the documentation of this file.
1
#include "
YAPOG/System/Time/Time.hpp
"
2
3
namespace
yap
4
{
5
Time::Time
()
6
: value_ ()
7
{
8
}
9
10
Time::Time
(
float
seconds)
11
: value_ (sf::seconds (seconds))
12
{
13
}
14
15
Time::Time
(
const
sf::Time& copy)
16
: value_ (copy)
17
{
18
}
19
20
Time::Time
(
const
Time
& copy)
21
: value_ (copy.value_)
22
{
23
}
24
25
Time
&
Time::operator=
(
const
Time
& copy)
26
{
27
if
(
this
== ©)
28
return
*
this
;
29
30
value_
= copy.
value_
;
31
32
return
*
this
;
33
}
34
35
Time
Time::operator+
(
const
Time
& rhs)
36
{
37
return
Time
(
value_
+ rhs.
value_
);
38
}
39
40
Time
Time::operator+
(
float
rhs)
41
{
42
return
operator+
(
Time
(rhs));
43
}
44
45
Time
Time::operator-
(
const
Time
& rhs)
46
{
47
return
Time
(
value_
- rhs.
value_
);
48
}
49
50
Time
Time::operator-
(
float
rhs)
51
{
52
return
operator-
(
Time
(rhs));
53
}
54
55
Time
&
Time::operator+=
(
const
Time
& rhs)
56
{
57
value_
+= rhs.
value_
;
58
59
return
*
this
;
60
}
61
62
Time
&
Time::operator+=
(
float
rhs)
63
{
64
return
operator+=
(
Time
(rhs));
65
}
66
67
Time
&
Time::operator-=
(
const
Time
& rhs)
68
{
69
value_
-= rhs.
value_
;
70
71
return
*
this
;
72
}
73
74
Time
&
Time::operator-=
(
float
rhs)
75
{
76
return
operator-=
(
Time
(rhs));
77
}
78
79
float
Time::GetValue
()
const
80
{
81
return
value_
.asSeconds ();
82
}
83
}
// namespace yap
YAPOG
src
YAPOG
System
Time
Time.cpp
Generated on Mon Sep 17 2012 22:24:26 for YAPOG by
1.8.1.1