YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
PokemonType.cpp
Go to the documentation of this file.
1
#include "
YAPOG/Game/Pokemon/PokemonType.hpp
"
2
#include "
YAPOG/Game/Factory/XmlObjectIDLoader.hpp
"
3
#include "
YAPOG/Game/Factory/ObjectFactory.hpp
"
4
5
namespace
yap
6
{
7
const
ID
PokemonType::DEFAULT_TYPE_ID
(100);
8
9
PokemonType::PokemonType
()
10
{
11
SetType1
(
DEFAULT_TYPE_ID
);
12
SetType2
(
DEFAULT_TYPE_ID
);
13
}
14
15
PokemonType::PokemonType
(
const
ID
& type1,
const
ID
& type2)
16
{
17
SetType1
(type1);
18
SetType2
(type2);
19
}
20
22
const
TypeInfo
&
PokemonType::GetType1
()
const
23
{
24
return
*
type1_
;
25
}
26
27
const
TypeInfo
&
PokemonType::GetType2
()
const
28
{
29
return
*
type2_
;
30
}
31
33
void
PokemonType::SetType1
(
const
ID
& typeID)
34
{
35
type1_
=
ObjectFactory::Instance
().
36
Create<TypeInfo> (
"TypeInfo"
,
ID
(typeID));
37
}
38
39
void
PokemonType::SetType2
(
const
ID
& typeID)
40
{
41
type2_
=
ObjectFactory::Instance
().
42
Create<TypeInfo> (
"TypeInfo"
,
ID
(typeID));
43
}
44
}
YAPOG
src
YAPOG
Game
Pokemon
PokemonType.cpp
Generated on Mon Sep 17 2012 22:24:25 for YAPOG by
1.8.1.1