00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "asAssetProcessor.h"
00018
00019 #ifdef __COMPILE_WITH_ANGELSCRIPT__
00020
00021 #include "../ScriptHelper.h"
00022
00023 #include "../../core/AssetProcessor.h"
00024
00025
00027 AssetProcessor* createAssetProcessor(AssetGroup *parent, const std::string &baseName)
00028 {
00029 return new AssetProcessor(parent, baseName);
00030 }
00031
00033 void bindAssetProcessor(asIScriptEngine *engine)
00034 {
00035
00036 int r;
00037
00038
00039 r = engine->RegisterObjectType("AssetProcessor", sizeof(AssetProcessor), asOBJ_REF);
00040 r = engine->RegisterObjectType("AssetGroup", sizeof(AssetGroup), asOBJ_REF);
00041
00042
00043 bindAssetProcessorBase<AssetProcessor>(engine, "AssetProcessor");
00044
00045
00046 r = engine->RegisterObjectBehaviour("AssetProcessor", asBEHAVE_FACTORY, "AssetProcessor@ f(AssetGroup @+, " \
00047 "const string &in)", asFUNCTION(createAssetProcessor), asCALL_CDECL);
00048 assert(r >= 0);
00049
00050 r = engine->RegisterObjectMethod("AssetProcessor", "AssetProcessor& opAssign(const AssetProcessor &in)",
00051 asFUNCTION(assignT<AssetProcessor>), asCALL_CDECL_OBJFIRST); assert(r >= 0);
00052 }
00053
00054 #endif // __COMPILE_WITH_ANGELSCRIPT__
00055
00056