00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "asScriptManager.h"
00018
00019
00020 #ifdef __COMPILE_WITH_ANGELSCRIPT__
00021
00022 #include "../ScriptHelper.h"
00023
00024 #include "../ScriptManager.h"
00025
00026
00028 void bindScriptManager(asIScriptEngine *engine)
00029 {
00030
00031 int r;
00032
00033
00034 r = engine->RegisterObjectType("ScriptManager", sizeof(ScriptManager), asOBJ_REF); assert(r >= 0);
00035
00036
00037 r = engine->RegisterObjectBehaviour("ScriptManager", asBEHAVE_ADDREF, "void f()",
00038 asMETHOD(ScriptManager, grab), asCALL_THISCALL); assert(r >= 0);
00039 r = engine->RegisterObjectBehaviour("ScriptManager", asBEHAVE_RELEASE, "void f()",
00040 asMETHOD(ScriptManager, drop), asCALL_THISCALL); assert(r >= 0);
00041
00042
00043 r = engine->RegisterObjectMethod("ScriptManager", "void init()",
00044 asMETHOD(ScriptManager, init), asCALL_THISCALL); assert(r >= 0);
00045 r = engine->RegisterObjectMethod("ScriptManager", "void clear()",
00046 asMETHOD(ScriptManager, clear), asCALL_THISCALL); assert(r >= 0);
00047
00048 r = engine->RegisterObjectMethod("ScriptManager", "bool addScript(Script @+)",
00049 asMETHOD(ScriptManager, addScript), asCALL_THISCALL); assert(r >= 0);
00050
00051 r = engine->RegisterObjectMethod("ScriptManager", "Script@ createScript(const string &in)",
00052 asMETHOD(ScriptManager, createScript), asCALL_THISCALL); assert(r >= 0);
00053 r = engine->RegisterObjectMethod("ScriptManager", "Script@ createScript(const string &in, bool)",
00054 asMETHOD(ScriptManager, createScript), asCALL_THISCALL); assert(r >= 0);
00055
00056 r = engine->RegisterObjectMethod("ScriptManager", "Script@ createScriptFromFile(const string &in)",
00057 asMETHODPR(ScriptManager, createScriptFromFile, (const std::string&, bool), Script*),
00058 asCALL_THISCALL); assert(r >= 0);
00059 r = engine->RegisterObjectMethod("ScriptManager", "Script@ createScriptFromFile(const string &in, bool)",
00060 asMETHODPR(ScriptManager, createScriptFromFile, (const std::string&, bool), Script*),
00061 asCALL_THISCALL); assert(r >= 0);
00062
00063 r = engine->RegisterObjectMethod("ScriptManager", "Script@ getScript(const u32)",
00064 asMETHODPR(ScriptManager, getScript, (const u32), Script*),
00065 asCALL_THISCALL); assert(r >= 0);
00066 r = engine->RegisterObjectMethod("ScriptManager", "Script@ getScript(const string &in)",
00067 asMETHODPR(ScriptManager, getScript, (const std::string &), Script*),
00068 asCALL_THISCALL); assert(r >= 0);
00069
00070 r = engine->RegisterObjectMethod("ScriptManager", "void removeScripts()",
00071 asMETHOD(ScriptManager, removeScripts), asCALL_THISCALL); assert(r >= 0);
00072 r = engine->RegisterObjectMethod("ScriptManager", "bool removeScript(Script @+)",
00073 asMETHODPR(ScriptManager, removeScript, (Script*), bool),
00074 asCALL_THISCALL); assert(r >= 0);
00075 r = engine->RegisterObjectMethod("ScriptManager", "bool removeScript(const u32)",
00076 asMETHODPR(ScriptManager, removeScript, (const u32), bool),
00077 asCALL_THISCALL); assert(r >= 0);
00078 r = engine->RegisterObjectMethod("ScriptManager", "bool removeScript(const string &in)",
00079 asMETHODPR(ScriptManager, removeScript, (const std::string &), bool),
00080 asCALL_THISCALL); assert(r >= 0);
00081 }
00082
00083 #endif // __COMPILE_WITH_ANGELSCRIPT__
00084
00085