Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

CThingFactory Class Reference

#include <thing.h>

List of all members.

Public Methods

 CThingFactory ()
 ~CThingFactory ()
int Register (int nTypeID, THING_ALLOCATER pAllocateProc, THING_PERLEVELINIT pPerLevelInitProc=NULL)
 Register a CThing given its type ID and a pointer to an allocate procedure.

CThingAllocate (int nTypeID)
 Allocate a CThing based on it's type ID. Returns NULL if no such type ID.

void PerLevelInitialize ()
 Called per level. Allows thing-specific per-level initialization. This function calls the per-level-init proc for all registered things.


Protected Attributes

vector<SDescriptor> m_aDescriptors


Detailed Description

Class where CThing types can register create handlers for themselves. These handlers provide information required to allocate an instance of a thing, e.g. when loading a level.


The documentation for this class was generated from the following file:

http://www.scorpioncity.com/djgame.html
Copyright (C) David Joffe. Generated: 15 Jul 2001