src/ai/api/ai_vehiclelist.hpp.sq
branchnoai
changeset 9741 53c1c5850e01
parent 9740 a98f20bce404
child 9745 fb2454d70f37
equal deleted inserted replaced
9740:a98f20bce404 9741:53c1c5850e01
     7 	template <> const AIVehicleList *GetParam(ForceType<const AIVehicleList *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AIVehicleList *)instance; }
     7 	template <> const AIVehicleList *GetParam(ForceType<const AIVehicleList *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AIVehicleList *)instance; }
     8 	template <> const AIVehicleList &GetParam(ForceType<const AIVehicleList &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIVehicleList *)instance; }
     8 	template <> const AIVehicleList &GetParam(ForceType<const AIVehicleList &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIVehicleList *)instance; }
     9 	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; }
     9 	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; }
    10 }; // namespace SQConvert
    10 }; // namespace SQConvert
    11 
    11 
    12 void SQAIVehicleListRegister(Squirrel *engine) {
    12 void SQAIVehicleList_Register(Squirrel *engine) {
    13 	DefSQClass <AIVehicleList> SQAIVehicleList("AIVehicleList");
    13 	DefSQClass <AIVehicleList> SQAIVehicleList("AIVehicleList");
    14 	SQAIVehicleList.PreRegister(engine, "AIAbstractList");
    14 	SQAIVehicleList.PreRegister(engine, "AIAbstractList");
    15 	SQAIVehicleList.AddConstructor<void (AIVehicleList::*)(), 1>(engine, "x");
    15 	SQAIVehicleList.AddConstructor<void (AIVehicleList::*)(), 1>(engine, "x");
    16 
    16 
    17 	SQAIVehicleList.DefSQStaticMethod(engine, &AIVehicleList::GetClassName, "GetClassName", 1, "x");
    17 	SQAIVehicleList.DefSQStaticMethod(engine, &AIVehicleList::GetClassName, "GetClassName", 1, "x");
    26 	template <> const AIStationVehicleList *GetParam(ForceType<const AIStationVehicleList *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AIStationVehicleList *)instance; }
    26 	template <> const AIStationVehicleList *GetParam(ForceType<const AIStationVehicleList *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AIStationVehicleList *)instance; }
    27 	template <> const AIStationVehicleList &GetParam(ForceType<const AIStationVehicleList &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIStationVehicleList *)instance; }
    27 	template <> const AIStationVehicleList &GetParam(ForceType<const AIStationVehicleList &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIStationVehicleList *)instance; }
    28 	template <> int Return<AIStationVehicleList *>(HSQUIRRELVM vm, AIStationVehicleList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIStationVehicleList", res, NULL, DefSQDestructorCallback<AIStationVehicleList>); return 1; }
    28 	template <> int Return<AIStationVehicleList *>(HSQUIRRELVM vm, AIStationVehicleList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIStationVehicleList", res, NULL, DefSQDestructorCallback<AIStationVehicleList>); return 1; }
    29 }; // namespace SQConvert
    29 }; // namespace SQConvert
    30 
    30 
    31 void SQAIStationVehicleListRegister(Squirrel *engine) {
    31 void SQAIStationVehicleList_Register(Squirrel *engine) {
    32 	DefSQClass <AIStationVehicleList> SQAIStationVehicleList("AIStationVehicleList");
    32 	DefSQClass <AIStationVehicleList> SQAIStationVehicleList("AIStationVehicleList");
    33 	SQAIStationVehicleList.PreRegister(engine, "AIAbstractList");
    33 	SQAIStationVehicleList.PreRegister(engine, "AIAbstractList");
    34 	SQAIStationVehicleList.AddConstructor<void (AIStationVehicleList::*)(StationID station_id), 2>(engine, "xi");
    34 	SQAIStationVehicleList.AddConstructor<void (AIStationVehicleList::*)(StationID station_id), 2>(engine, "xi");
    35 
    35 
    36 	SQAIStationVehicleList.DefSQStaticMethod(engine, &AIStationVehicleList::GetClassName, "GetClassName", 1, "x");
    36 	SQAIStationVehicleList.DefSQStaticMethod(engine, &AIStationVehicleList::GetClassName, "GetClassName", 1, "x");