#include <bsControllerDefinition.h>
Classes | |
struct | EmitterVariable |
Emitter compile information. More... | |
struct | Event |
Event compile information. More... | |
Public Member Functions | |
ControllerDefinition (const String &name) | |
Constructor. | |
EmitterVariable & | addEmitterVariable (const String &name, const String &emitter, const bstype *args) |
Add an emitter variable definition. | |
EmitterVariable & | getEmitterVariable (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. | |
Event & | addEvent (const String &name, ParseTreeNode *node) |
Add an event definition. | |
Event & | getEvent (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. |
ControllerDefinitions are created from scripts, and contain the information needed to set up Controllers.
BS_NMSP::ControllerDefinition::ControllerDefinition | ( | const String & | name | ) | [explicit] |
Constructor.
name | name of the definition, generally set from script. |
EmitterVariable& BS_NMSP::ControllerDefinition::addEmitterVariable | ( | const String & | name, | |
const String & | emitter, | |||
const bstype * | args | |||
) |
Event& BS_NMSP::ControllerDefinition::addEvent | ( | const String & | name, | |
ParseTreeNode * | node | |||
) |
Add an event definition.
name | name of the event. | |
node | node in the ParseTree, for quick lookup during code generation. |
EmitterVariable& BS_NMSP::ControllerDefinition::getEmitterVariable | ( | int | index | ) |
Get an Emitter variable definition.
index | index of the emitter variable. |
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.
name | name of the emitter variable. |
Event& BS_NMSP::ControllerDefinition::getEvent | ( | int | index | ) |
Get an event definition.
index | index of the event. |
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.
name | name of the event. |
int BS_NMSP::ControllerDefinition::getMaxBlocks | ( | ) | const |
Gets the maximum number of blocks that an event or state in this ControllerDefinition can specify.
int BS_NMSP::ControllerDefinition::getMaxEventLocalVariables | ( | ) | const |
Gets the maximum number of local variables that an event in this ControllerDefinition can take.
int BS_NMSP::ControllerDefinition::getNumEmitterVariables | ( | ) | const |
Gets the number of emitter variable definitions in this ControllerDefinition.
int BS_NMSP::ControllerDefinition::getNumEvents | ( | ) | const |
Gets the number of event definitions in this ControllerDefinition.
void BS_NMSP::ControllerDefinition::setMaxBlocks | ( | int | count | ) |
Sets the maximum number of blocks that an event or state in this ControllerDefinition can specify.
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.
count | maximum number of locals. |