ActorFactory Class Reference

#include <ActorFactory.h>

Inheritance diagram for ActorFactory:
Object

# Public Member Functions

void constructor ()
 Class' constructor.
void spawnActor (const PositionedActor *positionedActor, Container parent, int16 internalId)
bool createNextActor ()
bool hasActorsPending ()
void print (int32 x, int32 y)

# Protected Attributes

VirtualList actorsToInstantiate
 List of actors pending instantiation.
VirtualList actorsToTransform
 List of actors pending transformation.
VirtualList actorsToAddAsChildren
 List of actors pending being added to their parent.
VirtualList spawnedActors
 List of actors that have been completely instantianted and configured.
int32 instantiationPhase

# Private Member Functions

uint32 instantiateActors ()
uint32 transformActors ()
uint32 addChildActors ()
- Private Member Functions inherited from Object
void constructor ()
 Class' constructor.
const void * getVTable ()
bool mutateTo (const void *targetClass)

# Additional Inherited Members

- Static Private Member Functions inherited from Object
static Object getCast (void *object, ClassPointer targetClassGetClassMethod, ClassPointer baseClassGetClassMethod)
- Private Attributes inherited from Object
void * vTable
 Pointer to the class's virtual table.

# Detailed Description

Class ActorFactory

Inherits from Object

Implements a factory that creates actors over time.

Definition at line 43 of file ActorFactory.h.

# Member Function Documentation

# addChildActors()

uint32 ActorFactory::addChildActors ( )
private

Definition at line 404 of file ActorFactory.c.

# constructor()

void ActorFactory::constructor ( )

Class' constructor.

Definition at line 71 of file ActorFactory.c.

# createNextActor()

bool ActorFactory::createNextActor ( )

Create the next queued actor.

Returns
False if there are no actors pending instantiation; true otherwise

Definition at line 180 of file ActorFactory.c.

# hasActorsPending()

bool ActorFactory::hasActorsPending ( )

Check if there are actors pending instantiation.

Returns
True if there are actors pending instantiation; false otherwise

Definition at line 217 of file ActorFactory.c.

# instantiateActors()

uint32 ActorFactory::instantiateActors ( )
private

These are not meant to be called externally. They are declared here because of the preprocessor's limitations for forward declarations in source files. Don't call these.

Definition at line 260 of file ActorFactory.c.

# print()

void ActorFactory::print ( int32 x,
int32 y )

Print the factory's state.

Parameters
xScreen x coordinate where to print
yScreen y coordinate where to print

Definition at line 227 of file ActorFactory.c.

# spawnActor()

void ActorFactory::spawnActor ( const PositionedActor * positionedActor,
Container parent,
int16 internalId )

Create a new actor instance and configure it with the provided arguments.

Parameters
positionedActorStruct that defines which actor spec to use to configure the new actor and the spatial information about where and how to positione it
parentThe parent of the new actor instance
internalIdID to keep track internally of the new instance

Definition at line 157 of file ActorFactory.c.

# transformActors()

uint32 ActorFactory::transformActors ( )
private

Definition at line 322 of file ActorFactory.c.

# Member Data Documentation

# actorsToAddAsChildren

VirtualList ActorFactory::actorsToAddAsChildren
protected

List of actors pending being added to their parent.

Definition at line 54 of file ActorFactory.h.

# actorsToInstantiate

VirtualList ActorFactory::actorsToInstantiate
protected

List of actors pending instantiation.

Definition at line 48 of file ActorFactory.h.

# actorsToTransform

VirtualList ActorFactory::actorsToTransform
protected

List of actors pending transformation.

Definition at line 51 of file ActorFactory.h.

# instantiationPhase

int32 ActorFactory::instantiationPhase
protected

Index of the current phase to process for the instantiation and configuration of actors

Definition at line 61 of file ActorFactory.h.

# spawnedActors

VirtualList ActorFactory::spawnedActors
protected

List of actors that have been completely instantianted and configured.

Definition at line 57 of file ActorFactory.h.


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