#include <ThingFactory.h>
Inherits SubsystemInterface.
Inherited by W3DThingFactory.
Public Member Functions | |
| ThingFactory (void) | |
| virtual | ~ThingFactory (void) |
| virtual void | init (void) |
| virtual void | postProcessLoad (void) |
| virtual void | reset (void) |
| virtual void | update (void) |
| ThingTemplate * | newTemplate (const AsciiString &name) |
| create a new template with name 'name' and add to template list | |
| const ThingTemplate * | firstTemplate (void) |
| const ThingTemplate * | findTemplate (const AsciiString &name, Bool check=TRUE) |
| const ThingTemplate * | findByTemplateID (UnsignedShort id) |
| Object * | newObject (const ThingTemplate *tmplate, Team *team, ObjectStatusMaskType statusMask=OBJECT_STATUS_MASK_NONE) |
| Drawable * | newDrawable (const ThingTemplate *tmplate, DrawableStatus statusBits=DRAWABLE_STATUS_NONE) |
Public Member Functions inherited from SubsystemInterface | |
| SubsystemInterface () | |
| virtual | ~SubsystemInterface () |
| virtual void | draw (void) |
| void | UPDATE (void) |
| void | DRAW (void) |
| AsciiString | getName (void) |
| void | setName (AsciiString name) |
Static Public Member Functions | |
| static void | parseObjectDefinition (INI *ini, const AsciiString &name, const AsciiString &reskinFrom) |
Additional Inherited Members | |
Protected Attributes inherited from SubsystemInterface | |
| AsciiString | m_name |
Implementation of the thing manager interface singleton
Definition at line 55 of file ThingFactory.h.
| ThingFactory::ThingFactory | ( | void | ) |
Definition at line 109 of file ThingFactory.cpp.
|
virtual |
Definition at line 119 of file ThingFactory.cpp.
| const ThingTemplate * ThingFactory::findByTemplateID | ( | UnsignedShort | id | ) |
get a template given ID. return null if not found. note, this is not particularly fast (does a linear search).
Return the template with the matching database name
Definition at line 255 of file ThingFactory.cpp.
|
inline |
get a template given template database name. return null if not found. note, this is now substantially faster (does a hash-table lookup)
Definition at line 79 of file ThingFactory.h.
|
inline |
Definition at line 73 of file ThingFactory.h.
|
virtual |
| Drawable * ThingFactory::newDrawable | ( | const ThingTemplate * | tmplate, |
| DrawableStatus | statusBits = DRAWABLE_STATUS_NONE ) |
request a new drawable using the given template. this will throw an exception on failure; it will never return null.
Definition at line 350 of file ThingFactory.cpp.
| Object * ThingFactory::newObject | ( | const ThingTemplate * | tmplate, |
| Team * | team, | ||
| ObjectStatusMaskType | statusMask = OBJECT_STATUS_MASK_NONE ) |
request a new object using the given template. this will throw an exception on failure; it will never return null.
Definition at line 305 of file ThingFactory.cpp.
| ThingTemplate * ThingFactory::newTemplate | ( | const AsciiString & | name | ) |
create a new template with name 'name' and add to template list
Create a new template with name 'name' and add to our template list
Definition at line 130 of file ThingFactory.cpp.
|
static |
Parse Object entry
Definition at line 372 of file ThingFactory.cpp.
|
virtual |
Post process phase after loading the database files
Reimplemented from SubsystemInterface.
Definition at line 514 of file ThingFactory.cpp.
|
virtual |
|
virtual |