author | truebrain |
Fri, 23 May 2008 08:52:29 +0000 | |
branch | noai |
changeset 10674 | 542470cee8a2 |
parent 10212 | 1e0a2a182253 |
child 10722 | 6ea1daff57aa |
permissions | -rw-r--r-- |
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:
9746
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:
9746
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:
9746
diff
changeset
|
3 |
|
9614
814c3bbf8ecc
(svn r9781) [NoAI] -Add: added AIVehicleListProfit[This|Last]Year as valuator
truelight
parents:
diff
changeset
|
4 |
#include "ai_vehiclelist.hpp" |
814c3bbf8ecc
(svn r9781) [NoAI] -Add: added AIVehicleListProfit[This|Last]Year as valuator
truelight
parents:
diff
changeset
|
5 |
|
814c3bbf8ecc
(svn r9781) [NoAI] -Add: added AIVehicleListProfit[This|Last]Year as valuator
truelight
parents:
diff
changeset
|
6 |
namespace SQConvert { |
814c3bbf8ecc
(svn r9781) [NoAI] -Add: added AIVehicleListProfit[This|Last]Year as valuator
truelight
parents:
diff
changeset
|
7 |
/* Allow AIVehicleList to be used as Squirrel parameter */ |
814c3bbf8ecc
(svn r9781) [NoAI] -Add: added AIVehicleListProfit[This|Last]Year as valuator
truelight
parents:
diff
changeset
|
8 |
template <> AIVehicleList *GetParam(ForceType<AIVehicleList *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIVehicleList *)instance; } |
814c3bbf8ecc
(svn r9781) [NoAI] -Add: added AIVehicleListProfit[This|Last]Year as valuator
truelight
parents:
diff
changeset
|
9 |
template <> AIVehicleList &GetParam(ForceType<AIVehicleList &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIVehicleList *)instance; } |
814c3bbf8ecc
(svn r9781) [NoAI] -Add: added AIVehicleListProfit[This|Last]Year as valuator
truelight
parents:
diff
changeset
|
10 |
template <> const AIVehicleList *GetParam(ForceType<const AIVehicleList *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIVehicleList *)instance; } |
814c3bbf8ecc
(svn r9781) [NoAI] -Add: added AIVehicleListProfit[This|Last]Year as valuator
truelight
parents:
diff
changeset
|
11 |
template <> const AIVehicleList &GetParam(ForceType<const AIVehicleList &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIVehicleList *)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<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; } |
9614
814c3bbf8ecc
(svn r9781) [NoAI] -Add: added AIVehicleListProfit[This|Last]Year as valuator
truelight
parents:
diff
changeset
|
13 |
}; // namespace SQConvert |
814c3bbf8ecc
(svn r9781) [NoAI] -Add: added AIVehicleListProfit[This|Last]Year as valuator
truelight
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:
9740
diff
changeset
|
15 |
void SQAIVehicleList_Register(Squirrel *engine) { |
9614
814c3bbf8ecc
(svn r9781) [NoAI] -Add: added AIVehicleListProfit[This|Last]Year as valuator
truelight
parents:
diff
changeset
|
16 |
DefSQClass <AIVehicleList> SQAIVehicleList("AIVehicleList"); |
814c3bbf8ecc
(svn r9781) [NoAI] -Add: added AIVehicleListProfit[This|Last]Year as valuator
truelight
parents:
diff
changeset
|
17 |
SQAIVehicleList.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:
9614
diff
changeset
|
18 |
SQAIVehicleList.AddConstructor<void (AIVehicleList::*)(), 1>(engine, "x"); |
9614
814c3bbf8ecc
(svn r9781) [NoAI] -Add: added AIVehicleListProfit[This|Last]Year as valuator
truelight
parents:
diff
changeset
|
19 |
|
814c3bbf8ecc
(svn r9781) [NoAI] -Add: added AIVehicleListProfit[This|Last]Year as valuator
truelight
parents:
diff
changeset
|
20 |
SQAIVehicleList.DefSQStaticMethod(engine, &AIVehicleList::GetClassName, "GetClassName", 1, "x"); |
814c3bbf8ecc
(svn r9781) [NoAI] -Add: added AIVehicleListProfit[This|Last]Year as valuator
truelight
parents:
diff
changeset
|
21 |
|
814c3bbf8ecc
(svn r9781) [NoAI] -Add: added AIVehicleListProfit[This|Last]Year as valuator
truelight
parents:
diff
changeset
|
22 |
SQAIVehicleList.PostRegister(engine); |
814c3bbf8ecc
(svn r9781) [NoAI] -Add: added AIVehicleListProfit[This|Last]Year as valuator
truelight
parents:
diff
changeset
|
23 |
} |
9647
c17046b1b8a2
(svn r10540) [NoAI] -Add: added AIStationVehicleList, which lists all vehicles that go to a given station
truelight
parents:
9635
diff
changeset
|
24 |
|
c17046b1b8a2
(svn r10540) [NoAI] -Add: added AIStationVehicleList, which lists all vehicles that go to a given station
truelight
parents:
9635
diff
changeset
|
25 |
namespace SQConvert { |
9745
fb2454d70f37
(svn r12225) [NoAI] -Change [API CHANGE]: AIStationVehicleList -> AIVehicleList_Station (WATCH THE NAMES CAREFULLY!)
truebrain
parents:
9741
diff
changeset
|
26 |
/* Allow AIVehicleList_Station to be used as Squirrel parameter */ |
fb2454d70f37
(svn r12225) [NoAI] -Change [API CHANGE]: AIStationVehicleList -> AIVehicleList_Station (WATCH THE NAMES CAREFULLY!)
truebrain
parents:
9741
diff
changeset
|
27 |
template <> AIVehicleList_Station *GetParam(ForceType<AIVehicleList_Station *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIVehicleList_Station *)instance; } |
fb2454d70f37
(svn r12225) [NoAI] -Change [API CHANGE]: AIStationVehicleList -> AIVehicleList_Station (WATCH THE NAMES CAREFULLY!)
truebrain
parents:
9741
diff
changeset
|
28 |
template <> AIVehicleList_Station &GetParam(ForceType<AIVehicleList_Station &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIVehicleList_Station *)instance; } |
fb2454d70f37
(svn r12225) [NoAI] -Change [API CHANGE]: AIStationVehicleList -> AIVehicleList_Station (WATCH THE NAMES CAREFULLY!)
truebrain
parents:
9741
diff
changeset
|
29 |
template <> const AIVehicleList_Station *GetParam(ForceType<const AIVehicleList_Station *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIVehicleList_Station *)instance; } |
fb2454d70f37
(svn r12225) [NoAI] -Change [API CHANGE]: AIStationVehicleList -> AIVehicleList_Station (WATCH THE NAMES CAREFULLY!)
truebrain
parents:
9741
diff
changeset
|
30 |
template <> const AIVehicleList_Station &GetParam(ForceType<const AIVehicleList_Station &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIVehicleList_Station *)instance; } |
fb2454d70f37
(svn r12225) [NoAI] -Change [API CHANGE]: AIStationVehicleList -> AIVehicleList_Station (WATCH THE NAMES CAREFULLY!)
truebrain
parents:
9741
diff
changeset
|
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; } |
9647
c17046b1b8a2
(svn r10540) [NoAI] -Add: added AIStationVehicleList, which lists all vehicles that go to a given station
truelight
parents:
9635
diff
changeset
|
32 |
}; // namespace SQConvert |
c17046b1b8a2
(svn r10540) [NoAI] -Add: added AIStationVehicleList, which lists all vehicles that go to a given station
truelight
parents:
9635
diff
changeset
|
33 |
|
9745
fb2454d70f37
(svn r12225) [NoAI] -Change [API CHANGE]: AIStationVehicleList -> AIVehicleList_Station (WATCH THE NAMES CAREFULLY!)
truebrain
parents:
9741
diff
changeset
|
34 |
void SQAIVehicleList_Station_Register(Squirrel *engine) { |
fb2454d70f37
(svn r12225) [NoAI] -Change [API CHANGE]: AIStationVehicleList -> AIVehicleList_Station (WATCH THE NAMES CAREFULLY!)
truebrain
parents:
9741
diff
changeset
|
35 |
DefSQClass <AIVehicleList_Station> SQAIVehicleList_Station("AIVehicleList_Station"); |
9746
e4ab7ea8d897
(svn r12226) [NoAI] -Fix: remove the dep for AIStationList_Vehicle on AIStationList, as Squirrel doesn't like it
truebrain
parents:
9745
diff
changeset
|
36 |
SQAIVehicleList_Station.PreRegister(engine, "AIAbstractList"); |
9745
fb2454d70f37
(svn r12225) [NoAI] -Change [API CHANGE]: AIStationVehicleList -> AIVehicleList_Station (WATCH THE NAMES CAREFULLY!)
truebrain
parents:
9741
diff
changeset
|
37 |
SQAIVehicleList_Station.AddConstructor<void (AIVehicleList_Station::*)(StationID station_id), 2>(engine, "xi"); |
9647
c17046b1b8a2
(svn r10540) [NoAI] -Add: added AIStationVehicleList, which lists all vehicles that go to a given station
truelight
parents:
9635
diff
changeset
|
38 |
|
9745
fb2454d70f37
(svn r12225) [NoAI] -Change [API CHANGE]: AIStationVehicleList -> AIVehicleList_Station (WATCH THE NAMES CAREFULLY!)
truebrain
parents:
9741
diff
changeset
|
39 |
SQAIVehicleList_Station.DefSQStaticMethod(engine, &AIVehicleList_Station::GetClassName, "GetClassName", 1, "x"); |
9647
c17046b1b8a2
(svn r10540) [NoAI] -Add: added AIStationVehicleList, which lists all vehicles that go to a given station
truelight
parents:
9635
diff
changeset
|
40 |
|
9745
fb2454d70f37
(svn r12225) [NoAI] -Change [API CHANGE]: AIStationVehicleList -> AIVehicleList_Station (WATCH THE NAMES CAREFULLY!)
truebrain
parents:
9741
diff
changeset
|
41 |
SQAIVehicleList_Station.PostRegister(engine); |
9647
c17046b1b8a2
(svn r10540) [NoAI] -Add: added AIStationVehicleList, which lists all vehicles that go to a given station
truelight
parents:
9635
diff
changeset
|
42 |
} |