Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
script::ScriptManager Class Reference

#include <ScriptManager.h>

Inheritance diagram for script::ScriptManager:
engine::Object core::Singleton< ScriptManager >

List of all members.

Public Member Functions

void compile (Script *script)
 Compile a script.
ScriptcreateScript (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.
ScriptgetScript (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 ScriptManagergetInstance ()
 Get instance.

Protected Member Functions

void initializeImpl ()
void uninitializeImpl ()
void updateImpl (f32 elapsedTime)

Protected Attributes

std::map< u32, Script * > mScripts
 Central list of scripts - for easy memory management and lookup.


class ResourceManager

Detailed Description

Scripting Manager.

This class handles everything related to scripting.

: Kat'Oun
: 1.0

Constructor & Destructor Documentation

script::ScriptManager::ScriptManager ( )
script::ScriptManager::~ScriptManager ( )

References getInstance().

Member Function Documentation

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]
Script * script::ScriptManager::getScript ( const u32 id)

Retrieves a pointer to a script by id.

References mScripts.

void script::ScriptManager::initializeImpl ( ) [protected, virtual]
void script::ScriptManager::removeAllScripts ( )

Removes (and destroys) all scripts.

References mScripts.

Referenced by uninitializeImpl().

void script::ScriptManager::removeScript ( const u32 id)

Removes a script.

References mScripts.

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.

Friends And Related Function Documentation

friend class ResourceManager [friend]

Member Data Documentation

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 documentation for this class was generated from the following files:

The KG Game Engine
The KG Game Engine Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:10 by Doxygen (1.7.4)