Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members |
#include <ScriptManager.h>
Public Member Functions | |
void | compile (Script *script) |
Compile a script. | |
Script * | createScript (const std::string &scriptFilename) |
Creates a script to be managed by script manager. | |
void | execute (const std::string &data, Script *script=NULL) |
Execute a script command. | |
Script * | getScript (const u32 &id) |
Retrieves a pointer to a script by id. | |
void | removeAllScripts () |
Removes (and destroys) all scripts. | |
void | removeScript (Script *scr) |
Removes a script. | |
void | removeScript (const u32 &id) |
Removes a script. | |
void | removeScriptDriver () |
void | runScript (Script *script) |
Run a script. | |
ScriptManager () | |
Default constructor. | |
void | setScriptDriver (ScriptDriver *driver) |
~ScriptManager () | |
Static Public Member Functions | |
static ScriptManager * | getInstance () |
Get instance. | |
Protected Member Functions | |
void | initializeImpl () |
void | uninitializeImpl () |
void | updateImpl (f32 elapsedTime) |
Protected Attributes | |
ScriptDriver * | mScriptDriver |
std::map< u32, Script * > | mScripts |
Central list of scripts - for easy memory management and lookup. | |
Friends | |
class | ResourceManager |
Scripting Manager.
This class handles everything related to scripting.
script::ScriptManager::ScriptManager | ( | ) |
Default constructor.
References getInstance(), engine::Object::mObjectType, mScriptDriver, and engine::OT_SCRIPT_MANAGER.
script::ScriptManager::~ScriptManager | ( | ) |
References getInstance().
void script::ScriptManager::compile | ( | Script * | script | ) |
Compile a script.
References script::ScriptDriver::compile(), and mScriptDriver.
Script * script::ScriptManager::createScript | ( | const std::string & | scriptFilename | ) |
Creates a script to be managed by script manager.
References engine::Object::getID(), getInstance(), mScripts, and resource::RT_RESOURCE_SCRIPT.
void script::ScriptManager::execute | ( | const std::string & | data, |
Script * | script = NULL |
||
) |
Execute a script command.
References script::ScriptDriver::execute(), and mScriptDriver.
ScriptManager * script::ScriptManager::getInstance | ( | ) | [static] |
Get instance.
Reimplemented from core::Singleton< ScriptManager >.
Referenced by createScript(), initializeImpl(), ScriptManager(), uninitializeImpl(), and ~ScriptManager().
Retrieves a pointer to a script by id.
References mScripts.
void script::ScriptManager::initializeImpl | ( | ) | [protected, virtual] |
Reimplemented from engine::Object.
References getInstance(), script::ScriptDriver::initialize(), and mScriptDriver.
void script::ScriptManager::removeAllScripts | ( | ) |
void script::ScriptManager::removeScript | ( | Script * | scr | ) |
Removes a script.
References engine::Object::getID().
void script::ScriptManager::removeScriptDriver | ( | ) |
References mScriptDriver.
void script::ScriptManager::runScript | ( | Script * | script | ) |
Run a script.
References mScriptDriver, and script::ScriptDriver::runScript().
void script::ScriptManager::setScriptDriver | ( | ScriptDriver * | driver | ) |
References mScriptDriver.
void script::ScriptManager::uninitializeImpl | ( | ) | [protected, virtual] |
Reimplemented from engine::Object.
References getInstance(), and removeAllScripts().
void script::ScriptManager::updateImpl | ( | f32 | elapsedTime | ) | [protected, virtual] |
Reimplemented from engine::Object.
friend class ResourceManager [friend] |
ScriptDriver* script::ScriptManager::mScriptDriver [protected] |
Referenced by compile(), execute(), initializeImpl(), removeScriptDriver(), runScript(), ScriptManager(), and setScriptDriver().
std::map<u32, Script*> script::ScriptManager::mScripts [protected] |
Central list of scripts - for easy memory management and lookup.
Referenced by createScript(), getScript(), removeAllScripts(), and removeScript().
The KG Game Engine
Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:10 by
Doxygen
(1.7.4)
|