author | truebrain |
Wed, 23 Apr 2008 12:05:32 +0000 | |
branch | noai |
changeset 10308 | 0c81dfce3e9b |
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:
9825
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:
9825
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:
9825
diff
changeset
|
3 |
|
9825
cc77111ebd85
(svn r12437) [NoAI] -Add: functions to get the current date and to determine the year/month/day from that date.
rubidium
parents:
diff
changeset
|
4 |
#include "ai_date.hpp" |
cc77111ebd85
(svn r12437) [NoAI] -Add: functions to get the current date and to determine the year/month/day from that date.
rubidium
parents:
diff
changeset
|
5 |
|
cc77111ebd85
(svn r12437) [NoAI] -Add: functions to get the current date and to determine the year/month/day from that date.
rubidium
parents:
diff
changeset
|
6 |
namespace SQConvert { |
cc77111ebd85
(svn r12437) [NoAI] -Add: functions to get the current date and to determine the year/month/day from that date.
rubidium
parents:
diff
changeset
|
7 |
/* Allow AIDate to be used as Squirrel parameter */ |
cc77111ebd85
(svn r12437) [NoAI] -Add: functions to get the current date and to determine the year/month/day from that date.
rubidium
parents:
diff
changeset
|
8 |
template <> AIDate *GetParam(ForceType<AIDate *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIDate *)instance; } |
cc77111ebd85
(svn r12437) [NoAI] -Add: functions to get the current date and to determine the year/month/day from that date.
rubidium
parents:
diff
changeset
|
9 |
template <> AIDate &GetParam(ForceType<AIDate &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIDate *)instance; } |
cc77111ebd85
(svn r12437) [NoAI] -Add: functions to get the current date and to determine the year/month/day from that date.
rubidium
parents:
diff
changeset
|
10 |
template <> const AIDate *GetParam(ForceType<const AIDate *>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIDate *)instance; } |
cc77111ebd85
(svn r12437) [NoAI] -Add: functions to get the current date and to determine the year/month/day from that date.
rubidium
parents:
diff
changeset
|
11 |
template <> const AIDate &GetParam(ForceType<const AIDate &>, HSQUIRRELVM vm, int index) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIDate *)instance; } |
cc77111ebd85
(svn r12437) [NoAI] -Add: functions to get the current date and to determine the year/month/day from that date.
rubidium
parents:
diff
changeset
|
12 |
template <> int Return<AIDate *>(HSQUIRRELVM vm, AIDate *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIDate", res, NULL, DefSQDestructorCallback<AIDate>); return 1; } |
cc77111ebd85
(svn r12437) [NoAI] -Add: functions to get the current date and to determine the year/month/day from that date.
rubidium
parents:
diff
changeset
|
13 |
}; // namespace SQConvert |
cc77111ebd85
(svn r12437) [NoAI] -Add: functions to get the current date and to determine the year/month/day from that date.
rubidium
parents:
diff
changeset
|
14 |
|
cc77111ebd85
(svn r12437) [NoAI] -Add: functions to get the current date and to determine the year/month/day from that date.
rubidium
parents:
diff
changeset
|
15 |
void SQAIDate_Register(Squirrel *engine) { |
cc77111ebd85
(svn r12437) [NoAI] -Add: functions to get the current date and to determine the year/month/day from that date.
rubidium
parents:
diff
changeset
|
16 |
DefSQClass <AIDate> SQAIDate("AIDate"); |
cc77111ebd85
(svn r12437) [NoAI] -Add: functions to get the current date and to determine the year/month/day from that date.
rubidium
parents:
diff
changeset
|
17 |
SQAIDate.PreRegister(engine); |
cc77111ebd85
(svn r12437) [NoAI] -Add: functions to get the current date and to determine the year/month/day from that date.
rubidium
parents:
diff
changeset
|
18 |
SQAIDate.AddConstructor<void (AIDate::*)(), 1>(engine, "x"); |
cc77111ebd85
(svn r12437) [NoAI] -Add: functions to get the current date and to determine the year/month/day from that date.
rubidium
parents:
diff
changeset
|
19 |
|
cc77111ebd85
(svn r12437) [NoAI] -Add: functions to get the current date and to determine the year/month/day from that date.
rubidium
parents:
diff
changeset
|
20 |
SQAIDate.DefSQStaticMethod(engine, &AIDate::GetClassName, "GetClassName", 1, "x"); |
cc77111ebd85
(svn r12437) [NoAI] -Add: functions to get the current date and to determine the year/month/day from that date.
rubidium
parents:
diff
changeset
|
21 |
SQAIDate.DefSQStaticMethod(engine, &AIDate::GetCurrentDate, "GetCurrentDate", 1, "x"); |
cc77111ebd85
(svn r12437) [NoAI] -Add: functions to get the current date and to determine the year/month/day from that date.
rubidium
parents:
diff
changeset
|
22 |
SQAIDate.DefSQStaticMethod(engine, &AIDate::GetYear, "GetYear", 2, "xi"); |
cc77111ebd85
(svn r12437) [NoAI] -Add: functions to get the current date and to determine the year/month/day from that date.
rubidium
parents:
diff
changeset
|
23 |
SQAIDate.DefSQStaticMethod(engine, &AIDate::GetMonth, "GetMonth", 2, "xi"); |
cc77111ebd85
(svn r12437) [NoAI] -Add: functions to get the current date and to determine the year/month/day from that date.
rubidium
parents:
diff
changeset
|
24 |
SQAIDate.DefSQStaticMethod(engine, &AIDate::GetDayOfMonth, "GetDayOfMonth", 2, "xi"); |
cc77111ebd85
(svn r12437) [NoAI] -Add: functions to get the current date and to determine the year/month/day from that date.
rubidium
parents:
diff
changeset
|
25 |
SQAIDate.DefSQStaticMethod(engine, &AIDate::GetDate, "GetDate", 4, "xiii"); |
cc77111ebd85
(svn r12437) [NoAI] -Add: functions to get the current date and to determine the year/month/day from that date.
rubidium
parents:
diff
changeset
|
26 |
|
cc77111ebd85
(svn r12437) [NoAI] -Add: functions to get the current date and to determine the year/month/day from that date.
rubidium
parents:
diff
changeset
|
27 |
SQAIDate.PostRegister(engine); |
cc77111ebd85
(svn r12437) [NoAI] -Add: functions to get the current date and to determine the year/month/day from that date.
rubidium
parents:
diff
changeset
|
28 |
} |