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