OpenMW
Public Member Functions | Private Types | Private Attributes
MWScript::ScriptManager Class Reference

#include <scriptmanagerimp.hpp>

List of all members.

Public Member Functions

 ScriptManager (const MWWorld::ESMStore &store, bool verbose, Compiler::Context &compilerContext)
virtual void run (const std::string &name, Interpreter::Context &interpreterContext)
 Run the script with the given name (compile first, if not compiled yet)
virtual bool compile (const std::string &name)
virtual void resetGlobalScripts ()
virtual std::pair< int, int > compileAll ()
virtual Compiler::LocalsgetLocals (const std::string &name)
 Return locals for script name.
virtual GlobalScriptsgetGlobalScripts ()
virtual int getLocalIndex (const std::string &scriptId, const std::string &variable, char type)

Private Types

typedef std::pair< std::vector
< Interpreter::Type_Code >
, Compiler::Locals
CompiledScript
typedef std::map< std::string,
CompiledScript
ScriptCollection

Private Attributes

Compiler::StreamErrorHandler mErrorHandler
const MWWorld::ESMStoremStore
bool mVerbose
Compiler::ContextmCompilerContext
Compiler::FileParser mParser
Interpreter::Interpreter mInterpreter
bool mOpcodesInstalled
ScriptCollection mScripts
GlobalScripts mGlobalScripts
std::map< std::string,
Compiler::Locals
mOtherLocals

Member Typedef Documentation

typedef std::map<std::string, CompiledScript> MWScript::ScriptManager::ScriptCollection [private]

Constructor & Destructor Documentation

MWScript::ScriptManager::ScriptManager ( const MWWorld::ESMStore store,
bool  verbose,
Compiler::Context compilerContext 
)

Member Function Documentation

bool MWScript::ScriptManager::compile ( const std::string &  name) [virtual]

Compile script with the given namen

Returns:
Success?

Implements MWBase::ScriptManager.

std::pair< int, int > MWScript::ScriptManager::compileAll ( ) [virtual]

Compile all scripts

Returns:
count, success

Implements MWBase::ScriptManager.

Implements MWBase::ScriptManager.

int MWScript::ScriptManager::getLocalIndex ( const std::string &  scriptId,
const std::string &  variable,
char  type 
) [virtual]

Return index of the variable of the given name and type in the given script. Will throw an exception, if there is no such script or variable or the type does not match.

Implements MWBase::ScriptManager.

Compiler::Locals & MWScript::ScriptManager::getLocals ( const std::string &  name) [virtual]

Return locals for script name.

Implements MWBase::ScriptManager.

Implements MWBase::ScriptManager.

void MWScript::ScriptManager::run ( const std::string &  name,
Interpreter::Context interpreterContext 
) [virtual]

Run the script with the given name (compile first, if not compiled yet)

Implements MWBase::ScriptManager.


Member Data Documentation

std::map<std::string, Compiler::Locals> MWScript::ScriptManager::mOtherLocals [private]

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