BS_NMSP::EmitterDefinition Class Reference

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

#include <bsEmitterDefinition.h>

Inheritance diagram for BS_NMSP::EmitterDefinition:

BS_NMSP::ObjectDefinition

List of all members.

Classes

struct  Function
 Function compile information. More...

Public Member Functions

 EmitterDefinition (const String &name)
 Constructor.
void _setIndex (int index)
 Set index.
int _getIndex () const
 Get index.
FunctionaddFunction (const String &name, ParseTreeNode *node)
 Add a function definition.
FunctiongetFunction (int index)
 Get a function definition.
int getFunctionIndex (const String &name) const
 Get a function definition index.
int getNumFunctions () const
 Gets the number of function definitions in this EmitterDefinition.


Detailed Description

Class to store a definition for instantiating Emitter objects.

EmitterDefinitions are created from scripts, and contain the information needed to set up Emitter.


Constructor & Destructor Documentation

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

Constructor.

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


Member Function Documentation

int BS_NMSP::EmitterDefinition::_getIndex (  )  const

Get index.

This is an internal method used by code generation.

Returns:
EmitterDefinition index in virtual machine.

void BS_NMSP::EmitterDefinition::_setIndex ( int  index  ) 

Set index.

This is an internal method used by code generation.

Parameters:
EmitterDefinition index.

Function& BS_NMSP::EmitterDefinition::addFunction ( const String &  name,
ParseTreeNode *  node 
)

Add a function definition.

Parameters:
name name of the function.
node a pointer to the ParseTreeNode, for quick access during code generation.
Returns:
reference to the function definition.

Function& BS_NMSP::EmitterDefinition::getFunction ( int  index  ) 

Get a function definition.

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

int BS_NMSP::EmitterDefinition::getFunctionIndex ( const String &  name  )  const

Get a function definition index.

This is used in conjunction with getFunction to retrieve a function definition by name.

Parameters:
name name of the function.
Returns:
reference to the function definition.

int BS_NMSP::EmitterDefinition::getNumFunctions (  )  const

Gets the number of function definitions in this EmitterDefinition.

Returns:
number of function definitions.


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