BS_NMSP::CodeRecord Class Reference

Class to hold bytecode for states, functions and events. More...

#include <bsCore.h>

List of all members.

Public Member Functions

 CodeRecord (const String &name)
 Constructor.
 ~CodeRecord ()
 Destructor.
const String & getName () const
 Returns Affector instance name.
void addVariable (const String &name)
 Add a named local variable to this CodeRecord.
const String & getVariable (int index) const
 Get the name of a local variable.
int getVariableIndex (const String &name) const
 Get a local variable index.
int getNumVariables () const
 Get the number of local variables.

Public Attributes

uint32 * byteCode
size_t byteCodeSize
JittedFunction jitFunction


Detailed Description

Class to hold bytecode for states, functions and events.

Bytecode blocks are stored in the ScriptMachine and shared by instances that need it.


Constructor & Destructor Documentation

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

Constructor.

Parameters:
name name of record.


Member Function Documentation

void BS_NMSP::CodeRecord::addVariable ( const String &  name  ) 

Add a named local variable to this CodeRecord.

Parameters:
name name of record.

const String& BS_NMSP::CodeRecord::getName (  )  const

Returns Affector instance name.

Returns:
the Affector instance name.

int BS_NMSP::CodeRecord::getNumVariables (  )  const

Get the number of local variables.

Returns:
number of local variables.

const String& BS_NMSP::CodeRecord::getVariable ( int  index  )  const

Get the name of a local variable.

Parameters:
index index of the variable.
Returns:
the local variable name.

int BS_NMSP::CodeRecord::getVariableIndex ( const String &  name  )  const

Get a local variable index.

Parameters:
name name of the local variable.


Member Data Documentation

Bytecode array. Public for convenience, however it is for internal use only.

Size of bytecode array. Public for convenience, however it is for internal use only.

Jitted function, if available.


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