summaryrefslogtreecommitdiff
path: root/src/script/api/template/template_cargolist.hpp.sq
blob: 394d20f91d13b5f7d9942b25f7b8153e770f53d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
 * This file is part of OpenTTD.
 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 */

/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */

#include "../script_cargolist.hpp"

namespace SQConvert {
	/* Allow ScriptCargoList to be used as Squirrel parameter */
	template <> inline ScriptCargoList *GetParam(ForceType<ScriptCargoList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (ScriptCargoList *)instance; }
	template <> inline ScriptCargoList &GetParam(ForceType<ScriptCargoList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargoList *)instance; }
	template <> inline const ScriptCargoList *GetParam(ForceType<const ScriptCargoList *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (ScriptCargoList *)instance; }
	template <> inline const ScriptCargoList &GetParam(ForceType<const ScriptCargoList &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargoList *)instance; }
	template <> inline int Return<ScriptCargoList *>(HSQUIRRELVM vm, ScriptCargoList *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "CargoList", res, nullptr, DefSQDestructorCallback<ScriptCargoList>, true); return 1; }
} // namespace SQConvert

namespace SQConvert {
	/* Allow ScriptCargoList_IndustryAccepting to be used as Squirrel parameter */
	template <> inline ScriptCargoList_IndustryAccepting *GetParam(ForceType<ScriptCargoList_IndustryAccepting *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (ScriptCargoList_IndustryAccepting *)instance; }
	template <> inline ScriptCargoList_IndustryAccepting &GetParam(ForceType<ScriptCargoList_IndustryAccepting &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargoList_IndustryAccepting *)instance; }
	template <> inline const ScriptCargoList_IndustryAccepting *GetParam(ForceType<const ScriptCargoList_IndustryAccepting *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (ScriptCargoList_IndustryAccepting *)instance; }
	template <> inline const ScriptCargoList_IndustryAccepting &GetParam(ForceType<const ScriptCargoList_IndustryAccepting &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargoList_IndustryAccepting *)instance; }
	template <> inline int Return<ScriptCargoList_IndustryAccepting *>(HSQUIRRELVM vm, ScriptCargoList_IndustryAccepting *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "CargoList_IndustryAccepting", res, nullptr, DefSQDestructorCallback<ScriptCargoList_IndustryAccepting>, true); return 1; }
} // namespace SQConvert

namespace SQConvert {
	/* Allow ScriptCargoList_IndustryProducing to be used as Squirrel parameter */
	template <> inline ScriptCargoList_IndustryProducing *GetParam(ForceType<ScriptCargoList_IndustryProducing *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (ScriptCargoList_IndustryProducing *)instance; }
	template <> inline ScriptCargoList_IndustryProducing &GetParam(ForceType<ScriptCargoList_IndustryProducing &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargoList_IndustryProducing *)instance; }
	template <> inline const ScriptCargoList_IndustryProducing *GetParam(ForceType<const ScriptCargoList_IndustryProducing *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (ScriptCargoList_IndustryProducing *)instance; }
	template <> inline const ScriptCargoList_IndustryProducing &GetParam(ForceType<const ScriptCargoList_IndustryProducing &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargoList_IndustryProducing *)instance; }
	template <> inline int Return<ScriptCargoList_IndustryProducing *>(HSQUIRRELVM vm, ScriptCargoList_IndustryProducing *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "CargoList_IndustryProducing", res, nullptr, DefSQDestructorCallback<ScriptCargoList_IndustryProducing>, true); return 1; }
} // namespace SQConvert

namespace SQConvert {
	/* Allow ScriptCargoList_StationAccepting to be used as Squirrel parameter */
	template <> inline ScriptCargoList_StationAccepting *GetParam(ForceType<ScriptCargoList_StationAccepting *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (ScriptCargoList_StationAccepting *)instance; }
	template <> inline ScriptCargoList_StationAccepting &GetParam(ForceType<ScriptCargoList_StationAccepting &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargoList_StationAccepting *)instance; }
	template <> inline const ScriptCargoList_StationAccepting *GetParam(ForceType<const ScriptCargoList_StationAccepting *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (ScriptCargoList_StationAccepting *)instance; }
	template <> inline const ScriptCargoList_StationAccepting &GetParam(ForceType<const ScriptCargoList_StationAccepting &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptCargoList_StationAccepting *)instance; }
	template <> inline int Return<ScriptCargoList_StationAccepting *>(HSQUIRRELVM vm, ScriptCargoList_StationAccepting *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "CargoList_StationAccepting", res, nullptr, DefSQDestructorCallback<ScriptCargoList_StationAccepting>, true); return 1; }
} // namespace SQConvert