]> jfr.im git - irc/gameservirc.git/blob - gameserv-2.0/libgameservgldl/src/GameLayer/GameObjects/GameObject.cpp
Added some initial Game Objects with the start of a namespace hierarchy
[irc/gameservirc.git] / gameserv-2.0 / libgameservgldl / src / GameLayer / GameObjects / GameObject.cpp
1 #include <GameServ/GameLayer/GameObjects/GameObject.h>
2 using GameServ::GameLayer::GameObjects::GameObject;
3 using GameServ::GameLayer::GameObjects::GameObjectIds_Eq;
4
5 #include <string>
6 using std::string;
7
8 #include <boost/shared_ptr.hpp>
9 using boost::shared_ptr;
10
11 GameObject::GameObject(void) : mId()
12 {
13 }
14
15 GameObject::GameObject(const string &Id) : mId(Id)
16 {
17 }
18
19 GameObject::~GameObject(void)
20 {
21 }
22
23 bool GameObject::operator==(const GameObject &right) const
24 {
25 return mId == right.mId;
26 }
27
28 bool GameObject::operator!=(const GameObject &right) const
29 {
30 return !(right == *this);
31 }
32
33 string GameObject::Id(void) const
34 {
35 return mId;
36 }
37
38 void GameObject::Id(const string &value)
39 {
40 mId = value;
41 }
42
43
44 GameObjectIds_Eq::GameObjectIds_Eq(const string &Id) : mId(Id)
45 {
46 }
47
48 bool GameObjectIds_Eq::operator ()(const shared_ptr<GameObject> &BO) const
49 {
50 return mId == BO->mId;
51 }
52
53
54
55
56
57
58
59
60