src/ai/api/ai_tilelist.hpp.sq
author truebrain
Wed, 23 Apr 2008 12:05:32 +0000
branchnoai
changeset 10308 0c81dfce3e9b
parent 10212 1e0a2a182253
child 10722 6ea1daff57aa
permissions -rw-r--r--
(svn r12849) [NoAI] -Fix: when .hpp.sq doesn't exists, don't run diff (tnx to Yexo)
10212
1e0a2a182253 (svn r12744) [NoAI] -Fix: added a comment to all .hpp.sq that those files are autogenerated, and shouldn't be manually altered
truebrain
parents: 9757
diff changeset
     1
/* $Id$ */
1e0a2a182253 (svn r12744) [NoAI] -Fix: added a comment to all .hpp.sq that those files are autogenerated, and shouldn't be manually altered
truebrain
parents: 9757
diff changeset
     2
/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
1e0a2a182253 (svn r12744) [NoAI] -Fix: added a comment to all .hpp.sq that those files are autogenerated, and shouldn't be manually altered
truebrain
parents: 9757
diff changeset
     3
9596
8af5a1399842 (svn r9629) [NoAI] -Codechange: move the squirrel export functions out of the API header files.
rubidium
parents:
diff changeset
     4
#include "ai_tilelist.hpp"
8af5a1399842 (svn r9629) [NoAI] -Codechange: move the squirrel export functions out of the API header files.
rubidium
parents:
diff changeset
     5
8af5a1399842 (svn r9629) [NoAI] -Codechange: move the squirrel export functions out of the API header files.
rubidium
parents:
diff changeset
     6
namespace SQConvert {
8af5a1399842 (svn r9629) [NoAI] -Codechange: move the squirrel export functions out of the API header files.
rubidium
parents:
diff changeset
     7
	/* Allow AITileList to be used as Squirrel parameter */
8af5a1399842 (svn r9629) [NoAI] -Codechange: move the squirrel export functions out of the API header files.
rubidium
parents:
diff changeset
     8
	template <> AITileList *GetParam(ForceType<AITileList *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AITileList *)instance; }
8af5a1399842 (svn r9629) [NoAI] -Codechange: move the squirrel export functions out of the API header files.
rubidium
parents:
diff changeset
     9
	template <> AITileList &GetParam(ForceType<AITileList &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileList *)instance; }
8af5a1399842 (svn r9629) [NoAI] -Codechange: move the squirrel export functions out of the API header files.
rubidium
parents:
diff changeset
    10
	template <> const AITileList *GetParam(ForceType<const AITileList *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AITileList *)instance; }
8af5a1399842 (svn r9629) [NoAI] -Codechange: move the squirrel export functions out of the API header files.
rubidium
parents:
diff changeset
    11
	template <> const AITileList &GetParam(ForceType<const AITileList &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileList *)instance; }
9680
5ed7bbfd51c7 (svn r10629) [NoAI] -Fix: on returning a class instance which is NULL, do not make a wrapper SQ, but return a NULL pointer too
truelight
parents: 9679
diff changeset
    12
	template <> int Return<AITileList *>(HSQUIRRELVM vm, AITileList *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITileList", res, NULL, DefSQDestructorCallback<AITileList>); return 1; }
9596
8af5a1399842 (svn r9629) [NoAI] -Codechange: move the squirrel export functions out of the API header files.
rubidium
parents:
diff changeset
    13
}; // namespace SQConvert
8af5a1399842 (svn r9629) [NoAI] -Codechange: move the squirrel export functions out of the API header files.
rubidium
parents:
diff changeset
    14
9741
53c1c5850e01 (svn r12221) [NoAI] -Fix: Register functions are no _Register functions, and always on top of the sort list
truebrain
parents: 9680
diff changeset
    15
void SQAITileList_Register(Squirrel *engine) {
9596
8af5a1399842 (svn r9629) [NoAI] -Codechange: move the squirrel export functions out of the API header files.
rubidium
parents:
diff changeset
    16
	DefSQClass <AITileList> SQAITileList("AITileList");
8af5a1399842 (svn r9629) [NoAI] -Codechange: move the squirrel export functions out of the API header files.
rubidium
parents:
diff changeset
    17
	SQAITileList.PreRegister(engine, "AIAbstractList");
9635
9ee82e091af7 (svn r10526) [NoAI] -Fix: a class with params for the constructor lost his instance when called from SQ (templates can be really useful ;))
truelight
parents: 9610
diff changeset
    18
	SQAITileList.AddConstructor<void (AITileList::*)(), 1>(engine, "x");
9596
8af5a1399842 (svn r9629) [NoAI] -Codechange: move the squirrel export functions out of the API header files.
rubidium
parents:
diff changeset
    19
8af5a1399842 (svn r9629) [NoAI] -Codechange: move the squirrel export functions out of the API header files.
rubidium
parents:
diff changeset
    20
	SQAITileList.DefSQStaticMethod(engine, &AITileList::GetClassName, "GetClassName", 1, "x");
8af5a1399842 (svn r9629) [NoAI] -Codechange: move the squirrel export functions out of the API header files.
rubidium
parents:
diff changeset
    21
8af5a1399842 (svn r9629) [NoAI] -Codechange: move the squirrel export functions out of the API header files.
rubidium
parents:
diff changeset
    22
	SQAITileList.DefSQMethod(engine, &AITileList::AddRectangle,    "AddRectangle",    3, "xii");
8af5a1399842 (svn r9629) [NoAI] -Codechange: move the squirrel export functions out of the API header files.
rubidium
parents:
diff changeset
    23
	SQAITileList.DefSQMethod(engine, &AITileList::AddTile,         "AddTile",         2, "xi");
8af5a1399842 (svn r9629) [NoAI] -Codechange: move the squirrel export functions out of the API header files.
rubidium
parents:
diff changeset
    24
	SQAITileList.DefSQMethod(engine, &AITileList::RemoveRectangle, "RemoveRectangle", 3, "xii");
8af5a1399842 (svn r9629) [NoAI] -Codechange: move the squirrel export functions out of the API header files.
rubidium
parents:
diff changeset
    25
	SQAITileList.DefSQMethod(engine, &AITileList::RemoveTile,      "RemoveTile",      2, "xi");
8af5a1399842 (svn r9629) [NoAI] -Codechange: move the squirrel export functions out of the API header files.
rubidium
parents:
diff changeset
    26
8af5a1399842 (svn r9629) [NoAI] -Codechange: move the squirrel export functions out of the API header files.
rubidium
parents:
diff changeset
    27
	SQAITileList.PostRegister(engine);
8af5a1399842 (svn r9629) [NoAI] -Codechange: move the squirrel export functions out of the API header files.
rubidium
parents:
diff changeset
    28
}
9757
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    29
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    30
namespace SQConvert {
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    31
	/* Allow AITileList_IndustryAccepting to be used as Squirrel parameter */
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    32
	template <> AITileList_IndustryAccepting *GetParam(ForceType<AITileList_IndustryAccepting *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AITileList_IndustryAccepting *)instance; }
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    33
	template <> AITileList_IndustryAccepting &GetParam(ForceType<AITileList_IndustryAccepting &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileList_IndustryAccepting *)instance; }
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    34
	template <> const AITileList_IndustryAccepting *GetParam(ForceType<const AITileList_IndustryAccepting *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AITileList_IndustryAccepting *)instance; }
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    35
	template <> const AITileList_IndustryAccepting &GetParam(ForceType<const AITileList_IndustryAccepting &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileList_IndustryAccepting *)instance; }
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    36
	template <> int Return<AITileList_IndustryAccepting *>(HSQUIRRELVM vm, AITileList_IndustryAccepting *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITileList_IndustryAccepting", res, NULL, DefSQDestructorCallback<AITileList_IndustryAccepting>); return 1; }
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    37
}; // namespace SQConvert
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    38
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    39
void SQAITileList_IndustryAccepting_Register(Squirrel *engine) {
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    40
	DefSQClass <AITileList_IndustryAccepting> SQAITileList_IndustryAccepting("AITileList_IndustryAccepting");
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    41
	SQAITileList_IndustryAccepting.PreRegister(engine, "AITileList");
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    42
	SQAITileList_IndustryAccepting.AddConstructor<void (AITileList_IndustryAccepting::*)(IndustryID industry_id, uint radius), 3>(engine, "xii");
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    43
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    44
	SQAITileList_IndustryAccepting.DefSQStaticMethod(engine, &AITileList_IndustryAccepting::GetClassName, "GetClassName", 1, "x");
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    45
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    46
	SQAITileList_IndustryAccepting.PostRegister(engine);
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    47
}
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    48
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    49
namespace SQConvert {
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    50
	/* Allow AITileList_IndustryProducing to be used as Squirrel parameter */
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    51
	template <> AITileList_IndustryProducing *GetParam(ForceType<AITileList_IndustryProducing *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AITileList_IndustryProducing *)instance; }
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    52
	template <> AITileList_IndustryProducing &GetParam(ForceType<AITileList_IndustryProducing &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileList_IndustryProducing *)instance; }
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    53
	template <> const AITileList_IndustryProducing *GetParam(ForceType<const AITileList_IndustryProducing *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return  (AITileList_IndustryProducing *)instance; }
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    54
	template <> const AITileList_IndustryProducing &GetParam(ForceType<const AITileList_IndustryProducing &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AITileList_IndustryProducing *)instance; }
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    55
	template <> int Return<AITileList_IndustryProducing *>(HSQUIRRELVM vm, AITileList_IndustryProducing *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AITileList_IndustryProducing", res, NULL, DefSQDestructorCallback<AITileList_IndustryProducing>); return 1; }
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    56
}; // namespace SQConvert
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    57
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    58
void SQAITileList_IndustryProducing_Register(Squirrel *engine) {
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    59
	DefSQClass <AITileList_IndustryProducing> SQAITileList_IndustryProducing("AITileList_IndustryProducing");
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    60
	SQAITileList_IndustryProducing.PreRegister(engine, "AITileList");
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    61
	SQAITileList_IndustryProducing.AddConstructor<void (AITileList_IndustryProducing::*)(IndustryID industry_id, uint radius), 3>(engine, "xii");
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    62
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    63
	SQAITileList_IndustryProducing.DefSQStaticMethod(engine, &AITileList_IndustryProducing::GetClassName, "GetClassName", 1, "x");
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    64
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    65
	SQAITileList_IndustryProducing.PostRegister(engine);
5cdc14959fb6 (svn r12242) [NoAI] -Add: added AITileList_Industry(Accepting|Producing), giving tiles on which you want to build a station for an industry
truebrain
parents: 9741
diff changeset
    66
}