Base factory object that creates new Entity objects. More...
#include <EntityFactory.h>
Public Member Functions | |
| EntityFactory (const std::string &filePath) | |
| virtual | ~EntityFactory () |
Protected Member Functions | |
| void | debug () |
| virtual bool | parseXml (const std::string &filePath)=0 |
Protected Attributes | |
| TiXmlDocument * | mXmlDoc |
| string | mSourceFile |
| StringList | mErrors |
Base factory object that creates new Entity objects.
The EntityFactory is an abstract class used by derived factories to create new Entity objects of the appropriate derived type (e.g., items, monsters, , etc.).
As it is an abstract class, a useable Factory object must be derived from EntityFactory.
| EntityFactory::EntityFactory | ( | const std::string & | filePath | ) | [inline] |
EntityFactor constructor.
| filePath | Path to an XML Definition file. |
| virtual EntityFactory::~EntityFactory | ( | ) | [inline, virtual] |
Ensures that mEntityDefinition is properly destroyed.
| void EntityFactory::debug | ( | ) | [inline, protected] |
| virtual bool EntityFactory::parseXml | ( | const std::string & | filePath | ) | [protected, pure virtual] |
Parses an Entity XML Definition file.
Implemented in ActorFactory, and PropFactory.
StringList EntityFactory::mErrors [protected] |
An internal list of error and warning messages.
string EntityFactory::mSourceFile [protected] |
The source XML file.
TiXmlDocument* EntityFactory::mXmlDoc [protected] |
A TinyXML Document object.
1.7.1