|
| | ScriptEngineProtocol () |
| | Constructor of ScriptEngineProtocol.
|
| virtual | ~ScriptEngineProtocol () |
| | Destructor of ScriptEngineProtocol.
|
| virtual ccScriptType | getScriptType () |
| | Get the specific script type.
|
|
virtual void | retainScriptObject (Object *, Object *) |
| | Reflect the retain relationship to script scope.
|
|
virtual void | rootScriptObject (Object *) |
| | Add the script object to root object.
|
|
virtual void | releaseScriptObject (Object *, Object *) |
| | Reflect the release relationship to script scope.
|
|
virtual void | unrootScriptObject (Object *) |
| | Remove the script object from root object.
|
|
virtual void | releaseAllChildrenRecursive (Node *) |
| | Release all children native refs for the given node in script scope.
|
|
virtual void | releaseAllNativeRefs (ax::Object *) |
| | Release all native refs for the given owner in script scope.
|
| virtual void | removeScriptObjectByObject (Object *) |
| | Remove script object,The specific meaning should refer to the ScriptType.
|
| virtual void | invalidateScriptObject (Object *obj) |
| | Invalidate all script-side handles for a native object.
|
| virtual void | removeScriptHandler (int) |
| | Remove script function handler, only LuaEngine class need to implement this function.
|
| virtual int | reallocateScriptHandler (int) |
| | Reallocate script function handler, only LuaEngine class need to implement this function.
|
| virtual int | executeString (const char *codes)=0 |
| | Execute script code contained in the given string.
|
| virtual int | executeScriptFile (const char *filename)=0 |
| | Execute a script file.
|
| virtual int | executeGlobalFunction (const char *functionName)=0 |
| | Execute a scripted global function.
|
| virtual int | sendEvent (const ScriptEvent &evt)=0 |
| | When trigger a script event ,call this func,add params needed into ScriptEvent object.nativeObject is object triggering the event, can be nullptr in Lua.
|
| virtual bool | handleAssert (const char *msg)=0 |
| | Handle the assert message.
|
| virtual void | setCalledFromScript (bool) |
| | Useless for Lua.
|
| virtual bool | isCalledFromScript () |
| | Useless for Lua.
|
| virtual bool | parseConfig (ConfigType type, std::string_view str)=0 |
| | Parse configuration file.
|
| virtual void | rootObject (Object *) |
| | Root a Reference.
|
| virtual void | unrootObject (Object *) |
| | Unroot a Reference.
|
|
virtual void | removeObjectProxy (Object *obj) |
| | Remove proxy for a native object.
|
|
virtual void | garbageCollect () |
| | Triggers the garbage collector.
|
Don't make ScriptEngineProtocol inherits from Object since setScriptEngine is invoked only once in AppDelegate.cpp, It will affect the lifecycle of ScriptEngine instance, the autorelease pool will be destroyed before destructing ScriptEngine.
So a crash will appear on Win32 if you click the close button.