GluonEngine::ScriptingEngine Class Reference

#include <scriptingengine.h>

Inheritance diagram for GluonEngine::ScriptingEngine:
GluonCore::Singleton< T > QObject

List of all members.

Classes

class  Private

Public Slots

QScriptSyntaxCheckResult registerAsset (const GluonEngine::ScriptingAsset *asset)
bool unregisterAsset (const GluonEngine::ScriptingAsset *asset) const
bool isRegistered (const GluonEngine::ScriptingAsset *asset) const
QString className (const GluonEngine::ScriptingAsset *asset) const
QScriptValue instantiateClass (const GluonEngine::ScriptingAsset *asset) const
QScriptValue instantiateClass (const QString &className) const
QScriptEngine * scriptEngine () const

Friends

class GluonCore::Singleton< ScriptingEngine >

Detailed Description

Definition at line 34 of file scriptingengine.h.


Member Function Documentation

QString ScriptingEngine::className ( const GluonEngine::ScriptingAsset asset  )  const [slot]

Get the class name for the class represented by the passed asset

Returns:
A string containing the class name of a specified asset

Definition at line 190 of file scriptingengine.cpp.

QScriptValue ScriptingEngine::instantiateClass ( const QString &  className  )  const [slot]

Return a QtScript instance of the class named className

Parameters:
className The name of the class you wish to instantiate an instance of
Returns:
An instance of the class, or an invalid QScriptValue if there is no class registered with the passed name

Definition at line 175 of file scriptingengine.cpp.

QScriptValue ScriptingEngine::instantiateClass ( const GluonEngine::ScriptingAsset asset  )  const [slot]

Return a QtScript instance of the class represented by the passed asset

Parameters:
asset The asset representing the class you wish to get an instance of
Returns:
An instance of the class, or an invalid QScriptValue if the asset did not represent a valid class

Definition at line 153 of file scriptingengine.cpp.

bool ScriptingEngine::isRegistered ( const GluonEngine::ScriptingAsset asset  )  const [slot]

Check whether an asset is registered with the engine.

Parameters:
asset The asset to check on
Returns:
True if asset is registered with the engine, false if not

Definition at line 147 of file scriptingengine.cpp.

QScriptSyntaxCheckResult ScriptingEngine::registerAsset ( const GluonEngine::ScriptingAsset asset  )  [slot]

Register the passed asset with the engine, thus allowing people to instantiate the classes it represents

Parameters:
asset The asset to be registered
Returns:
The check result returned by the engine upon checking the syntax of the script

Definition at line 83 of file scriptingengine.cpp.

QScriptEngine * ScriptingEngine::scriptEngine (  )  const [slot]

Definition at line 196 of file scriptingengine.cpp.

bool ScriptingEngine::unregisterAsset ( const GluonEngine::ScriptingAsset asset  )  const [slot]

Unregister the passed asset with the engine

Parameters:
asset The asset to unregister
Returns:
True if the asset was successfully unregistered. False is returned when the asset is not registered, or if the passed asset was not valid

Definition at line 132 of file scriptingengine.cpp.


Friends And Related Function Documentation

friend class GluonCore::Singleton< ScriptingEngine > [friend]

Definition at line 79 of file scriptingengine.h.


The documentation for this class was generated from the following files:
Generated on Mon Dec 27 13:13:43 2010 for Gluon by  doxygen 1.6.3