The entry point for executing script source code in You.i Engine.
This class is responsible for loading the C++ bindings into the binding engine as well as executing scripts from script source code. To execute script source code, a CYIBindingContext subclass must be instanced and then initialized using Init().
#include <binding/YiBindingContext.h>

Public Member Functions | |
| CYIBindingContext () | |
| virtual | ~CYIBindingContext () |
| virtual bool | Init ()=0 |
| virtual bool | ExecuteString (const CYIString &scriptString)=0 |
| virtual bool | ExecuteScript (const std::shared_ptr< CYIAssetScript > &pScriptAsset)=0 |
| virtual void | CreateGlobalObject (const CYIString &scriptObjectName, const CYIString &className, CYIScriptableObject *pScriptableObject)=0 |
| virtual CYIScriptableObject * | NewRootedObject (const CYIRuntimeTypeInfo &enforceClassType, const CYIString &scriptObjectName)=0 |
| virtual void | DumpToLog ()=0 |
| virtual bool | ConnectDebugger () |
| CYIBindingContext::CYIBindingContext | ( | ) |
|
virtual |
|
virtual |
Connects the debugger associated with the binding engine to allow debugging of the script source. Returns true if the debugger was successfully connected and false otherwise.
Reimplemented in CYIDTBindingContext.
|
pure virtual |
Creates an object that can be accessed globally in script source code with the name scriptObjectName. pScriptableObject is the C++ object that will be accessible in script source and className is its C++ class name.
Implemented in CYIDTBindingContext.
|
pure virtual |
Dumps the current context of the binding engine using CYILogger.
Implemented in CYIDTBindingContext.
|
pure virtual |
Executes script source from a script asset, pScriptAsset.
Implemented in CYIDTBindingContext.
|
pure virtual |
Executes script source code contained in the string scriptString.
Implemented in CYIDTBindingContext.
|
pure virtual |
Initializes the binding engine. This registers all You.i Engine bound classes with the binding engine for access in the script source code. Users of this class must register any custom bound classes after calling this method and before executing any scripts. Returns true if initialization was successful.
Implemented in CYIDTBindingContext.
|
pure virtual |
Creates a new instance of the script object with name scriptObjectName and forces the binding engine to keep the script object in memory and not garbage collected.
Implemented in CYIDTBindingContext.