BS_NMSP::ControllerDefinition Class Reference

Class to store a definition for instantiating Controller objects. More...

#include <bsControllerDefinition.h>

Inheritance diagram for BS_NMSP::ControllerDefinition:

BS_NMSP::ObjectDefinition

List of all members.

Classes

struct  EmitterVariable
 Emitter compile information. More...
struct  Event
 Event compile information. More...

Public Member Functions

 ControllerDefinition (const String &name)
 Constructor.
EmitterVariableaddEmitterVariable (const String &name, const String &emitter, const bstype *args)
 Add an emitter variable definition.
EmitterVariablegetEmitterVariable (int index)
 Get an Emitter variable definition.
int getEmitterVariableIndex (const String &name) const
 Get an Emitter variable definition index.
int getNumEmitterVariables () const
 Gets the number of emitter variable definitions in this ControllerDefinition.
EventaddEvent (const String &name, ParseTreeNode *node)
 Add an event definition.
EventgetEvent (int index)
 Get an event definition.
int getEventIndex (const String &name) const
 Get an event definition index.
int getNumEvents () const
 Gets the number of event definitions in this ControllerDefinition.
void setMaxEventLocalVariables (int count)
 Sets the maximum number of local variables that an event in this ControllerDefinition can take.
int getMaxEventLocalVariables () const
 Gets the maximum number of local variables that an event in this ControllerDefinition can take.
void setMaxBlocks (int count)
 Sets the maximum number of blocks that an event or state in this ControllerDefinition can specify.
int getMaxBlocks () const
 Gets the maximum number of blocks that an event or state in this ControllerDefinition can specify.


Detailed Description

Class to store a definition for instantiating Controller objects.

ControllerDefinitions are created from scripts, and contain the information needed to set up Controllers.


Constructor & Destructor Documentation

BS_NMSP::ControllerDefinition::ControllerDefinition ( const String &  name  )  [explicit]

Constructor.

Parameters:
name name of the definition, generally set from script.


Member Function Documentation

EmitterVariable& BS_NMSP::ControllerDefinition::addEmitterVariable ( const String &  name,
const String &  emitter,
const bstype *  args 
)

Add an emitter variable definition.

Parameters:
name name of the emitter variable.
emitter the type of Emitter that this variable is.
args array initial member variable values for the Emitter.
Returns:
reference to the emitter variable definition.

Event& BS_NMSP::ControllerDefinition::addEvent ( const String &  name,
ParseTreeNode *  node 
)

Add an event definition.

Parameters:
name name of the event.
node node in the ParseTree, for quick lookup during code generation.
Returns:
reference to the event definition.

EmitterVariable& BS_NMSP::ControllerDefinition::getEmitterVariable ( int  index  ) 

Get an Emitter variable definition.

Parameters:
index index of the emitter variable.
Returns:
reference to the emitter variable definition.

int BS_NMSP::ControllerDefinition::getEmitterVariableIndex ( const String &  name  )  const

Get an Emitter variable definition index.

This is used in conjunction with getEmitterVariable to retrieve an emitter variable definition by name.

Parameters:
name name of the emitter variable.
Returns:
index, or BS_NotFound if not found.

Event& BS_NMSP::ControllerDefinition::getEvent ( int  index  ) 

Get an event definition.

Parameters:
index index of the event.
Returns:
reference to the event definition.

int BS_NMSP::ControllerDefinition::getEventIndex ( const String &  name  )  const

Get an event definition index.

This is used in conjunction with getEvent to retrieve an event definition by name.

Parameters:
name name of the event.
Returns:
index, or BS_NotFound if not found.

int BS_NMSP::ControllerDefinition::getMaxBlocks (  )  const

Gets the maximum number of blocks that an event or state in this ControllerDefinition can specify.

Returns:
maximum number of blocks.

int BS_NMSP::ControllerDefinition::getMaxEventLocalVariables (  )  const

Gets the maximum number of local variables that an event in this ControllerDefinition can take.

Returns:
maximum number of locals.

int BS_NMSP::ControllerDefinition::getNumEmitterVariables (  )  const

Gets the number of emitter variable definitions in this ControllerDefinition.

Returns:
number of emitter variable definitions.

int BS_NMSP::ControllerDefinition::getNumEvents (  )  const

Gets the number of event definitions in this ControllerDefinition.

Returns:
number of event definitions.

void BS_NMSP::ControllerDefinition::setMaxBlocks ( int  count  ) 

Sets the maximum number of blocks that an event or state in this ControllerDefinition can specify.

Parameters:
count maximum number of blocks.

void BS_NMSP::ControllerDefinition::setMaxEventLocalVariables ( int  count  ) 

Sets the maximum number of local variables that an event in this ControllerDefinition can take.

Parameters:
count maximum number of locals.


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

Generated on Wed Mar 31 12:49:05 2010 for bulletscript by  doxygen 1.5.9