YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
XmlObjectIDLoader.hpp
Go to the documentation of this file.
1
#ifndef YAPOG_XMLOBJECTIDLOADER_HPP
2
# define YAPOG_XMLOBJECTIDLOADER_HPP
3
4
# include "
YAPOG/Macros.hpp
"
5
# include "
YAPOG/Game/Factory/IObjectIDLoader.hpp
"
6
# include "
YAPOG/Content/ContentManager.hpp
"
7
# include "
YAPOG/Collection/Map.hpp
"
8
# include "
YAPOG/Game/ID.hpp
"
9
# include "
YAPOG/System/String.hpp
"
10
# include "
YAPOG/System/Path.hpp
"
11
12
namespace
yap
13
{
14
template
<
typename
T,
typename
TXmlReader>
15
class
XmlObjectIDLoader
:
public
IObjectIDLoader
16
{
17
DISALLOW_COPY
(
XmlObjectIDLoader
);
18
19
public
:
20
21
typedef
T
LoadedType
;
22
typedef
TXmlReader
XmlReaderType
;
23
24
XmlObjectIDLoader
(
const
Path
& rootPath,
const
String
& rootNodeName);
25
virtual
~XmlObjectIDLoader
();
26
27
virtual
T*
Load
(
const
ID
&
id
);
28
29
private
:
30
31
T&
GetObject
(
const
ID
&
id
);
32
33
const
Path
rootPath_
;
34
const
String
rootNodeName_
;
35
36
collection::Map<ID, T*>
objects_
;
37
ID
currentID_
;
38
T*
currentObject_
;
39
};
40
}
// namespace yap
41
42
# include "
YAPOG/Game/Factory/XmlObjectIDLoader.hxx
"
43
44
#endif // YAPOG_XMLOBJECTIDLOADER_HPP
YAPOG
include
YAPOG
Game
Factory
XmlObjectIDLoader.hpp
Generated on Mon Sep 17 2012 22:24:23 for YAPOG by
1.8.1.1