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