3 |
3 |
4 #include "ai_vehiclelist.hpp" |
4 #include "ai_vehiclelist.hpp" |
5 |
5 |
6 namespace SQConvert { |
6 namespace SQConvert { |
7 /* Allow AIVehicleList to be used as Squirrel parameter */ |
7 /* Allow AIVehicleList to be used as Squirrel parameter */ |
8 template <> AIVehicleList *GetParam(ForceType<AIVehicleList *>, HSQUIRRELVM vm, int index, SQConvertedStrings *str) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIVehicleList *)instance; } |
8 template <> AIVehicleList *GetParam(ForceType<AIVehicleList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIVehicleList *)instance; } |
9 template <> AIVehicleList &GetParam(ForceType<AIVehicleList &>, HSQUIRRELVM vm, int index, SQConvertedStrings *str) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIVehicleList *)instance; } |
9 template <> AIVehicleList &GetParam(ForceType<AIVehicleList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIVehicleList *)instance; } |
10 template <> const AIVehicleList *GetParam(ForceType<const AIVehicleList *>, HSQUIRRELVM vm, int index, SQConvertedStrings *str) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIVehicleList *)instance; } |
10 template <> const AIVehicleList *GetParam(ForceType<const AIVehicleList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIVehicleList *)instance; } |
11 template <> const AIVehicleList &GetParam(ForceType<const AIVehicleList &>, HSQUIRRELVM vm, int index, SQConvertedStrings *str) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIVehicleList *)instance; } |
11 template <> const AIVehicleList &GetParam(ForceType<const AIVehicleList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIVehicleList *)instance; } |
12 template <> int Return<AIVehicleList *>(HSQUIRRELVM vm, AIVehicleList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIVehicleList", res, NULL, DefSQDestructorCallback<AIVehicleList>); return 1; } |
12 template <> int Return<AIVehicleList *>(HSQUIRRELVM vm, AIVehicleList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIVehicleList", res, NULL, DefSQDestructorCallback<AIVehicleList>); return 1; } |
13 }; // namespace SQConvert |
13 }; // namespace SQConvert |
14 |
14 |
15 void SQAIVehicleList_Register(Squirrel *engine) { |
15 void SQAIVehicleList_Register(Squirrel *engine) { |
16 DefSQClass <AIVehicleList> SQAIVehicleList("AIVehicleList"); |
16 DefSQClass <AIVehicleList> SQAIVehicleList("AIVehicleList"); |
22 SQAIVehicleList.PostRegister(engine); |
22 SQAIVehicleList.PostRegister(engine); |
23 } |
23 } |
24 |
24 |
25 namespace SQConvert { |
25 namespace SQConvert { |
26 /* Allow AIVehicleList_Station to be used as Squirrel parameter */ |
26 /* Allow AIVehicleList_Station to be used as Squirrel parameter */ |
27 template <> AIVehicleList_Station *GetParam(ForceType<AIVehicleList_Station *>, HSQUIRRELVM vm, int index, SQConvertedStrings *str) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIVehicleList_Station *)instance; } |
27 template <> AIVehicleList_Station *GetParam(ForceType<AIVehicleList_Station *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIVehicleList_Station *)instance; } |
28 template <> AIVehicleList_Station &GetParam(ForceType<AIVehicleList_Station &>, HSQUIRRELVM vm, int index, SQConvertedStrings *str) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIVehicleList_Station *)instance; } |
28 template <> AIVehicleList_Station &GetParam(ForceType<AIVehicleList_Station &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIVehicleList_Station *)instance; } |
29 template <> const AIVehicleList_Station *GetParam(ForceType<const AIVehicleList_Station *>, HSQUIRRELVM vm, int index, SQConvertedStrings *str) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIVehicleList_Station *)instance; } |
29 template <> const AIVehicleList_Station *GetParam(ForceType<const AIVehicleList_Station *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIVehicleList_Station *)instance; } |
30 template <> const AIVehicleList_Station &GetParam(ForceType<const AIVehicleList_Station &>, HSQUIRRELVM vm, int index, SQConvertedStrings *str) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIVehicleList_Station *)instance; } |
30 template <> const AIVehicleList_Station &GetParam(ForceType<const AIVehicleList_Station &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIVehicleList_Station *)instance; } |
31 template <> int Return<AIVehicleList_Station *>(HSQUIRRELVM vm, AIVehicleList_Station *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIVehicleList_Station", res, NULL, DefSQDestructorCallback<AIVehicleList_Station>); return 1; } |
31 template <> int Return<AIVehicleList_Station *>(HSQUIRRELVM vm, AIVehicleList_Station *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIVehicleList_Station", res, NULL, DefSQDestructorCallback<AIVehicleList_Station>); return 1; } |
32 }; // namespace SQConvert |
32 }; // namespace SQConvert |
33 |
33 |
34 void SQAIVehicleList_Station_Register(Squirrel *engine) { |
34 void SQAIVehicleList_Station_Register(Squirrel *engine) { |
35 DefSQClass <AIVehicleList_Station> SQAIVehicleList_Station("AIVehicleList_Station"); |
35 DefSQClass <AIVehicleList_Station> SQAIVehicleList_Station("AIVehicleList_Station"); |