Factory for production of Hero and Minions from xml definition files.
More...
#include <UnitFactory.hpp>
|
| | UnitFactory (std::string const &definitionFolderPath="./res/xml/", std::string const &defFileExtension=".def") |
| |
| std::shared_ptr< Pawn > | produce (std::string const &name) |
| | Creates a new Pawn derivative from the definition at path. More...
|
| |
|
|
void | loadDefinition (std::string const &name) |
| | Opens an xml file and holds it in mDefinitionMap, with its path as the key.
|
| |
|
|
std::map< std::string, XMLDocument * > | mDefinitionMap |
| | Map of file paths to currently open xml documents.
|
| |
|
std::string | mDefinitionFolderPath |
| | Path to folder containing xml unit definitions.
|
| |
|
std::string | mFileExt |
| | File extension of xml unit definitions.
|
| |
Factory for production of Hero and Minions from xml definition files.
| UnitFactory::UnitFactory |
( |
std::string const & |
definitionFolderPath = "./res/xml/", |
|
|
std::string const & |
defFileExtension = ".def" |
|
) |
| |
- Parameters
-
| definitionFolderPath | Path to a folder containing unit definition files |
| defFileExtension | File extension of unit definition files |
| std::shared_ptr<Pawn> UnitFactory::produce |
( |
std::string const & |
name | ) |
|
Creates a new Pawn derivative from the definition at path.
- Parameters
-
| name | Name of file containing definition, without the file extension. |
The documentation for this class was generated from the following file: