| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377 |
- /*
- ** Lua binding: IO
- ** Generated automatically by tolua++-1.0.92 on 06/30/13 11:31:50.
- */
- //
- // Copyright (c) 2008-2013 the Urho3D project.
- //
- // Permission is hereby granted, free of charge, to any person obtaining a copy
- // of this software and associated documentation files (the "Software"), to deal
- // in the Software without restriction, including without limitation the rights
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- // copies of the Software, and to permit persons to whom the Software is
- // furnished to do so, subject to the following conditions:
- //
- // The above copyright notice and this permission notice shall be included in
- // all copies or substantial portions of the Software.
- //
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- // THE SOFTWARE.
- //
- #include "Precompiled.h"
- #include "tolua++.h"
- /* Exported function */
- TOLUA_API int tolua_IO_open (lua_State* tolua_S);
- #define TOLUA_RELEASE
- #include "IOLuaAPI.h"
- #include "File.h"
- #include "FileSystem.h"
- #include "Log.h"
- #include "PackageFile.h"
- using namespace Urho3D;
- #pragma warning(disable:4800)
- /* function to release collected object via destructor */
- #ifdef __cplusplus
- static int tolua_collect_StringHash (lua_State* tolua_S)
- {
- StringHash* self = (StringHash*) tolua_tousertype(tolua_S,1,0);
- Mtolua_delete(self);
- return 0;
- }
- static int tolua_collect_String (lua_State* tolua_S)
- {
- String* self = (String*) tolua_tousertype(tolua_S,1,0);
- Mtolua_delete(self);
- return 0;
- }
- #endif
- /* function to register type */
- static void tolua_reg_types (lua_State* tolua_S)
- {
- tolua_usertype(tolua_S,"Log");
- tolua_usertype(tolua_S,"PackageEntry");
- tolua_usertype(tolua_S,"StringHash");
- tolua_usertype(tolua_S,"FileSystem");
- tolua_usertype(tolua_S,"Object");
- tolua_usertype(tolua_S,"Deserializer");
- tolua_usertype(tolua_S,"File");
- tolua_usertype(tolua_S,"String");
- tolua_usertype(tolua_S,"PackageFile");
- }
- /* method: Read of class File */
- #ifndef TOLUA_DISABLE_tolua_IO_File_Read00
- static int tolua_IO_File_Read00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"File",0,&tolua_err) ||
- !tolua_isuserdata(tolua_S,2,0,&tolua_err) ||
- !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,4,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- File* self = (File*) tolua_tousertype(tolua_S,1,0);
- void* dest = ((void*) tolua_touserdata(tolua_S,2,0));
- unsigned size = ((unsigned) tolua_tonumber(tolua_S,3,0));
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Read'", NULL);
- #endif
- {
- unsigned tolua_ret = (unsigned) self->Read(dest,size);
- tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'Read'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: Seek of class File */
- #ifndef TOLUA_DISABLE_tolua_IO_File_Seek00
- static int tolua_IO_File_Seek00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"File",0,&tolua_err) ||
- !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,3,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- File* self = (File*) tolua_tousertype(tolua_S,1,0);
- unsigned position = ((unsigned) tolua_tonumber(tolua_S,2,0));
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Seek'", NULL);
- #endif
- {
- unsigned tolua_ret = (unsigned) self->Seek(position);
- tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'Seek'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: GetName of class File */
- #ifndef TOLUA_DISABLE_tolua_IO_File_GetName00
- static int tolua_IO_File_GetName00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"const File",0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const File* self = (const File*) tolua_tousertype(tolua_S,1,0);
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetName'", NULL);
- #endif
- {
- const String& tolua_ret = (const String&) self->GetName();
- tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const String");
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'GetName'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: GetChecksum of class File */
- #ifndef TOLUA_DISABLE_tolua_IO_File_GetChecksum00
- static int tolua_IO_File_GetChecksum00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"File",0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- File* self = (File*) tolua_tousertype(tolua_S,1,0);
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetChecksum'", NULL);
- #endif
- {
- unsigned tolua_ret = (unsigned) self->GetChecksum();
- tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'GetChecksum'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: Open of class File */
- #ifndef TOLUA_DISABLE_tolua_IO_File_Open00
- static int tolua_IO_File_Open00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"File",0,&tolua_err) ||
- (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
- !tolua_isnumber(tolua_S,3,1,&tolua_err) ||
- !tolua_isnoobj(tolua_S,4,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- File* self = (File*) tolua_tousertype(tolua_S,1,0);
- const String* fileName = ((const String*) tolua_tousertype(tolua_S,2,0));
- FileMode mode = ((FileMode) (int) tolua_tonumber(tolua_S,3,FILE_READ));
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Open'", NULL);
- #endif
- {
- bool tolua_ret = (bool) self->Open(*fileName,mode);
- tolua_pushboolean(tolua_S,(bool)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'Open'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: Open of class File */
- #ifndef TOLUA_DISABLE_tolua_IO_File_Open01
- static int tolua_IO_File_Open01(lua_State* tolua_S)
- {
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"File",0,&tolua_err) ||
- !tolua_isusertype(tolua_S,2,"PackageFile",0,&tolua_err) ||
- (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,4,&tolua_err)
- )
- goto tolua_lerror;
- else
- {
- File* self = (File*) tolua_tousertype(tolua_S,1,0);
- PackageFile* package = ((PackageFile*) tolua_tousertype(tolua_S,2,0));
- const String* fileName = ((const String*) tolua_tousertype(tolua_S,3,0));
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Open'", NULL);
- #endif
- {
- bool tolua_ret = (bool) self->Open(package,*fileName);
- tolua_pushboolean(tolua_S,(bool)tolua_ret);
- }
- }
- return 1;
- tolua_lerror:
- return tolua_IO_File_Open00(tolua_S);
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: Close of class File */
- #ifndef TOLUA_DISABLE_tolua_IO_File_Close00
- static int tolua_IO_File_Close00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"File",0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- File* self = (File*) tolua_tousertype(tolua_S,1,0);
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Close'", NULL);
- #endif
- {
- self->Close();
- }
- }
- return 0;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'Close'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: Flush of class File */
- #ifndef TOLUA_DISABLE_tolua_IO_File_Flush00
- static int tolua_IO_File_Flush00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"File",0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- File* self = (File*) tolua_tousertype(tolua_S,1,0);
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Flush'", NULL);
- #endif
- {
- self->Flush();
- }
- }
- return 0;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'Flush'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: SetName of class File */
- #ifndef TOLUA_DISABLE_tolua_IO_File_SetName00
- static int tolua_IO_File_SetName00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"File",0,&tolua_err) ||
- (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,3,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- File* self = (File*) tolua_tousertype(tolua_S,1,0);
- const String* name = ((const String*) tolua_tousertype(tolua_S,2,0));
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetName'", NULL);
- #endif
- {
- self->SetName(*name);
- }
- }
- return 0;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'SetName'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: GetMode of class File */
- #ifndef TOLUA_DISABLE_tolua_IO_File_GetMode00
- static int tolua_IO_File_GetMode00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"const File",0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const File* self = (const File*) tolua_tousertype(tolua_S,1,0);
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetMode'", NULL);
- #endif
- {
- FileMode tolua_ret = (FileMode) self->GetMode();
- tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'GetMode'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: IsOpen of class File */
- #ifndef TOLUA_DISABLE_tolua_IO_File_IsOpen00
- static int tolua_IO_File_IsOpen00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"const File",0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const File* self = (const File*) tolua_tousertype(tolua_S,1,0);
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsOpen'", NULL);
- #endif
- {
- bool tolua_ret = (bool) self->IsOpen();
- tolua_pushboolean(tolua_S,(bool)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'IsOpen'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: GetHandle of class File */
- #ifndef TOLUA_DISABLE_tolua_IO_File_GetHandle00
- static int tolua_IO_File_GetHandle00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"const File",0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const File* self = (const File*) tolua_tousertype(tolua_S,1,0);
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetHandle'", NULL);
- #endif
- {
- void* tolua_ret = (void*) self->GetHandle();
- tolua_pushuserdata(tolua_S,(void*)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'GetHandle'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: IsPackaged of class File */
- #ifndef TOLUA_DISABLE_tolua_IO_File_IsPackaged00
- static int tolua_IO_File_IsPackaged00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"const File",0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const File* self = (const File*) tolua_tousertype(tolua_S,1,0);
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsPackaged'", NULL);
- #endif
- {
- bool tolua_ret = (bool) self->IsPackaged();
- tolua_pushboolean(tolua_S,(bool)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'IsPackaged'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* get function: SCAN_FILES */
- #ifndef TOLUA_DISABLE_tolua_get_SCAN_FILES
- static int tolua_get_SCAN_FILES(lua_State* tolua_S)
- {
- tolua_pushnumber(tolua_S,(lua_Number)SCAN_FILES);
- return 1;
- }
- #endif //#ifndef TOLUA_DISABLE
- /* get function: SCAN_DIRS */
- #ifndef TOLUA_DISABLE_tolua_get_SCAN_DIRS
- static int tolua_get_SCAN_DIRS(lua_State* tolua_S)
- {
- tolua_pushnumber(tolua_S,(lua_Number)SCAN_DIRS);
- return 1;
- }
- #endif //#ifndef TOLUA_DISABLE
- /* get function: SCAN_HIDDEN */
- #ifndef TOLUA_DISABLE_tolua_get_SCAN_HIDDEN
- static int tolua_get_SCAN_HIDDEN(lua_State* tolua_S)
- {
- tolua_pushnumber(tolua_S,(lua_Number)SCAN_HIDDEN);
- return 1;
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: SetCurrentDir of class FileSystem */
- #ifndef TOLUA_DISABLE_tolua_IO_FileSystem_SetCurrentDir00
- static int tolua_IO_FileSystem_SetCurrentDir00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"FileSystem",0,&tolua_err) ||
- (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,3,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- FileSystem* self = (FileSystem*) tolua_tousertype(tolua_S,1,0);
- const String* pathName = ((const String*) tolua_tousertype(tolua_S,2,0));
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetCurrentDir'", NULL);
- #endif
- {
- bool tolua_ret = (bool) self->SetCurrentDir(*pathName);
- tolua_pushboolean(tolua_S,(bool)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'SetCurrentDir'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: CreateDir of class FileSystem */
- #ifndef TOLUA_DISABLE_tolua_IO_FileSystem_CreateDir00
- static int tolua_IO_FileSystem_CreateDir00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"FileSystem",0,&tolua_err) ||
- (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,3,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- FileSystem* self = (FileSystem*) tolua_tousertype(tolua_S,1,0);
- const String* pathName = ((const String*) tolua_tousertype(tolua_S,2,0));
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'CreateDir'", NULL);
- #endif
- {
- bool tolua_ret = (bool) self->CreateDir(*pathName);
- tolua_pushboolean(tolua_S,(bool)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'CreateDir'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: SystemCommand of class FileSystem */
- #ifndef TOLUA_DISABLE_tolua_IO_FileSystem_SystemCommand00
- static int tolua_IO_FileSystem_SystemCommand00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"FileSystem",0,&tolua_err) ||
- (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,3,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- FileSystem* self = (FileSystem*) tolua_tousertype(tolua_S,1,0);
- const String* commandLine = ((const String*) tolua_tousertype(tolua_S,2,0));
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SystemCommand'", NULL);
- #endif
- {
- int tolua_ret = (int) self->SystemCommand(*commandLine);
- tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'SystemCommand'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: SystemOpen of class FileSystem */
- #ifndef TOLUA_DISABLE_tolua_IO_FileSystem_SystemOpen00
- static int tolua_IO_FileSystem_SystemOpen00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"FileSystem",0,&tolua_err) ||
- (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,3,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- FileSystem* self = (FileSystem*) tolua_tousertype(tolua_S,1,0);
- const String* fileName = ((const String*) tolua_tousertype(tolua_S,2,0));
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SystemOpen'", NULL);
- #endif
- {
- bool tolua_ret = (bool) self->SystemOpen(*fileName);
- tolua_pushboolean(tolua_S,(bool)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'SystemOpen'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: SystemOpen of class FileSystem */
- #ifndef TOLUA_DISABLE_tolua_IO_FileSystem_SystemOpen01
- static int tolua_IO_FileSystem_SystemOpen01(lua_State* tolua_S)
- {
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"FileSystem",0,&tolua_err) ||
- (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
- (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,4,&tolua_err)
- )
- goto tolua_lerror;
- else
- {
- FileSystem* self = (FileSystem*) tolua_tousertype(tolua_S,1,0);
- const String* fileName = ((const String*) tolua_tousertype(tolua_S,2,0));
- const String* mode = ((const String*) tolua_tousertype(tolua_S,3,0));
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SystemOpen'", NULL);
- #endif
- {
- bool tolua_ret = (bool) self->SystemOpen(*fileName,*mode);
- tolua_pushboolean(tolua_S,(bool)tolua_ret);
- }
- }
- return 1;
- tolua_lerror:
- return tolua_IO_FileSystem_SystemOpen00(tolua_S);
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: Copy of class FileSystem */
- #ifndef TOLUA_DISABLE_tolua_IO_FileSystem_Copy00
- static int tolua_IO_FileSystem_Copy00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"FileSystem",0,&tolua_err) ||
- (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
- (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,4,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- FileSystem* self = (FileSystem*) tolua_tousertype(tolua_S,1,0);
- const String* srcFileName = ((const String*) tolua_tousertype(tolua_S,2,0));
- const String* destFileName = ((const String*) tolua_tousertype(tolua_S,3,0));
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Copy'", NULL);
- #endif
- {
- bool tolua_ret = (bool) self->Copy(*srcFileName,*destFileName);
- tolua_pushboolean(tolua_S,(bool)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'Copy'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: Rename of class FileSystem */
- #ifndef TOLUA_DISABLE_tolua_IO_FileSystem_Rename00
- static int tolua_IO_FileSystem_Rename00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"FileSystem",0,&tolua_err) ||
- (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
- (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,4,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- FileSystem* self = (FileSystem*) tolua_tousertype(tolua_S,1,0);
- const String* srcFileName = ((const String*) tolua_tousertype(tolua_S,2,0));
- const String* destFileName = ((const String*) tolua_tousertype(tolua_S,3,0));
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Rename'", NULL);
- #endif
- {
- bool tolua_ret = (bool) self->Rename(*srcFileName,*destFileName);
- tolua_pushboolean(tolua_S,(bool)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'Rename'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: Delete of class FileSystem */
- #ifndef TOLUA_DISABLE_tolua_IO_FileSystem_Delete00
- static int tolua_IO_FileSystem_Delete00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"FileSystem",0,&tolua_err) ||
- (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,3,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- FileSystem* self = (FileSystem*) tolua_tousertype(tolua_S,1,0);
- const String* fileName = ((const String*) tolua_tousertype(tolua_S,2,0));
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Delete'", NULL);
- #endif
- {
- bool tolua_ret = (bool) self->Delete(*fileName);
- tolua_pushboolean(tolua_S,(bool)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'Delete'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: RegisterPath of class FileSystem */
- #ifndef TOLUA_DISABLE_tolua_IO_FileSystem_RegisterPath00
- static int tolua_IO_FileSystem_RegisterPath00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"FileSystem",0,&tolua_err) ||
- (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,3,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- FileSystem* self = (FileSystem*) tolua_tousertype(tolua_S,1,0);
- const String* pathName = ((const String*) tolua_tousertype(tolua_S,2,0));
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RegisterPath'", NULL);
- #endif
- {
- self->RegisterPath(*pathName);
- }
- }
- return 0;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'RegisterPath'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: GetCurrentDir of class FileSystem */
- #ifndef TOLUA_DISABLE_tolua_IO_FileSystem_GetCurrentDir00
- static int tolua_IO_FileSystem_GetCurrentDir00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"const FileSystem",0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const FileSystem* self = (const FileSystem*) tolua_tousertype(tolua_S,1,0);
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetCurrentDir'", NULL);
- #endif
- {
- String tolua_ret = (String) self->GetCurrentDir();
- {
- #ifdef __cplusplus
- void* tolua_obj = Mtolua_new((String)(tolua_ret));
- tolua_pushusertype(tolua_S,tolua_obj,"String");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #else
- void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(String));
- tolua_pushusertype(tolua_S,tolua_obj,"String");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #endif
- }
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'GetCurrentDir'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: HasRegisteredPaths of class FileSystem */
- #ifndef TOLUA_DISABLE_tolua_IO_FileSystem_HasRegisteredPaths00
- static int tolua_IO_FileSystem_HasRegisteredPaths00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"const FileSystem",0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const FileSystem* self = (const FileSystem*) tolua_tousertype(tolua_S,1,0);
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HasRegisteredPaths'", NULL);
- #endif
- {
- bool tolua_ret = (bool) self->HasRegisteredPaths();
- tolua_pushboolean(tolua_S,(bool)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'HasRegisteredPaths'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: CheckAccess of class FileSystem */
- #ifndef TOLUA_DISABLE_tolua_IO_FileSystem_CheckAccess00
- static int tolua_IO_FileSystem_CheckAccess00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"const FileSystem",0,&tolua_err) ||
- (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,3,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const FileSystem* self = (const FileSystem*) tolua_tousertype(tolua_S,1,0);
- const String* pathName = ((const String*) tolua_tousertype(tolua_S,2,0));
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'CheckAccess'", NULL);
- #endif
- {
- bool tolua_ret = (bool) self->CheckAccess(*pathName);
- tolua_pushboolean(tolua_S,(bool)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'CheckAccess'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: GetLastModifiedTime of class FileSystem */
- #ifndef TOLUA_DISABLE_tolua_IO_FileSystem_GetLastModifiedTime00
- static int tolua_IO_FileSystem_GetLastModifiedTime00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"const FileSystem",0,&tolua_err) ||
- (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,3,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const FileSystem* self = (const FileSystem*) tolua_tousertype(tolua_S,1,0);
- const String* fileName = ((const String*) tolua_tousertype(tolua_S,2,0));
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetLastModifiedTime'", NULL);
- #endif
- {
- unsigned tolua_ret = (unsigned) self->GetLastModifiedTime(*fileName);
- tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'GetLastModifiedTime'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: FileExists of class FileSystem */
- #ifndef TOLUA_DISABLE_tolua_IO_FileSystem_FileExists00
- static int tolua_IO_FileSystem_FileExists00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"const FileSystem",0,&tolua_err) ||
- (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,3,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const FileSystem* self = (const FileSystem*) tolua_tousertype(tolua_S,1,0);
- const String* fileName = ((const String*) tolua_tousertype(tolua_S,2,0));
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FileExists'", NULL);
- #endif
- {
- bool tolua_ret = (bool) self->FileExists(*fileName);
- tolua_pushboolean(tolua_S,(bool)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'FileExists'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: DirExists of class FileSystem */
- #ifndef TOLUA_DISABLE_tolua_IO_FileSystem_DirExists00
- static int tolua_IO_FileSystem_DirExists00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"const FileSystem",0,&tolua_err) ||
- (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,3,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const FileSystem* self = (const FileSystem*) tolua_tousertype(tolua_S,1,0);
- const String* pathName = ((const String*) tolua_tousertype(tolua_S,2,0));
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DirExists'", NULL);
- #endif
- {
- bool tolua_ret = (bool) self->DirExists(*pathName);
- tolua_pushboolean(tolua_S,(bool)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'DirExists'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: GetProgramDir of class FileSystem */
- #ifndef TOLUA_DISABLE_tolua_IO_FileSystem_GetProgramDir00
- static int tolua_IO_FileSystem_GetProgramDir00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"const FileSystem",0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const FileSystem* self = (const FileSystem*) tolua_tousertype(tolua_S,1,0);
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetProgramDir'", NULL);
- #endif
- {
- String tolua_ret = (String) self->GetProgramDir();
- {
- #ifdef __cplusplus
- void* tolua_obj = Mtolua_new((String)(tolua_ret));
- tolua_pushusertype(tolua_S,tolua_obj,"String");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #else
- void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(String));
- tolua_pushusertype(tolua_S,tolua_obj,"String");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #endif
- }
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'GetProgramDir'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: GetUserDocumentsDir of class FileSystem */
- #ifndef TOLUA_DISABLE_tolua_IO_FileSystem_GetUserDocumentsDir00
- static int tolua_IO_FileSystem_GetUserDocumentsDir00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"const FileSystem",0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const FileSystem* self = (const FileSystem*) tolua_tousertype(tolua_S,1,0);
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetUserDocumentsDir'", NULL);
- #endif
- {
- String tolua_ret = (String) self->GetUserDocumentsDir();
- {
- #ifdef __cplusplus
- void* tolua_obj = Mtolua_new((String)(tolua_ret));
- tolua_pushusertype(tolua_S,tolua_obj,"String");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #else
- void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(String));
- tolua_pushusertype(tolua_S,tolua_obj,"String");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #endif
- }
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'GetUserDocumentsDir'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* function: GetFileSystem */
- #ifndef TOLUA_DISABLE_tolua_IO_GetFileSystem00
- static int tolua_IO_GetFileSystem00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isnoobj(tolua_S,1,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- {
- FileSystem* tolua_ret = (FileSystem*) GetFileSystem();
- tolua_pushusertype(tolua_S,(void*)tolua_ret,"FileSystem");
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'GetFileSystem'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* function: SplitPath */
- #ifndef TOLUA_DISABLE_tolua_IO_SplitPath00
- static int tolua_IO_SplitPath00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- (tolua_isvaluenil(tolua_S,1,&tolua_err) || !tolua_isusertype(tolua_S,1,"const String",0,&tolua_err)) ||
- (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"String",0,&tolua_err)) ||
- (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"String",0,&tolua_err)) ||
- (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,5,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const String* fullPath = ((const String*) tolua_tousertype(tolua_S,1,0));
- String* pathName = ((String*) tolua_tousertype(tolua_S,2,0));
- String* fileName = ((String*) tolua_tousertype(tolua_S,3,0));
- String* extension = ((String*) tolua_tousertype(tolua_S,4,0));
- {
- SplitPath(*fullPath,*pathName,*fileName,*extension);
- }
- }
- return 0;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'SplitPath'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* function: GetPath */
- #ifndef TOLUA_DISABLE_tolua_IO_GetPath00
- static int tolua_IO_GetPath00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- (tolua_isvaluenil(tolua_S,1,&tolua_err) || !tolua_isusertype(tolua_S,1,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const String* fullPath = ((const String*) tolua_tousertype(tolua_S,1,0));
- {
- String tolua_ret = (String) GetPath(*fullPath);
- {
- #ifdef __cplusplus
- void* tolua_obj = Mtolua_new((String)(tolua_ret));
- tolua_pushusertype(tolua_S,tolua_obj,"String");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #else
- void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(String));
- tolua_pushusertype(tolua_S,tolua_obj,"String");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #endif
- }
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'GetPath'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* function: GetFileName */
- #ifndef TOLUA_DISABLE_tolua_IO_GetFileName00
- static int tolua_IO_GetFileName00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- (tolua_isvaluenil(tolua_S,1,&tolua_err) || !tolua_isusertype(tolua_S,1,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const String* fullPath = ((const String*) tolua_tousertype(tolua_S,1,0));
- {
- String tolua_ret = (String) GetFileName(*fullPath);
- {
- #ifdef __cplusplus
- void* tolua_obj = Mtolua_new((String)(tolua_ret));
- tolua_pushusertype(tolua_S,tolua_obj,"String");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #else
- void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(String));
- tolua_pushusertype(tolua_S,tolua_obj,"String");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #endif
- }
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'GetFileName'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* function: GetExtension */
- #ifndef TOLUA_DISABLE_tolua_IO_GetExtension00
- static int tolua_IO_GetExtension00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- (tolua_isvaluenil(tolua_S,1,&tolua_err) || !tolua_isusertype(tolua_S,1,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const String* fullPath = ((const String*) tolua_tousertype(tolua_S,1,0));
- {
- String tolua_ret = (String) GetExtension(*fullPath);
- {
- #ifdef __cplusplus
- void* tolua_obj = Mtolua_new((String)(tolua_ret));
- tolua_pushusertype(tolua_S,tolua_obj,"String");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #else
- void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(String));
- tolua_pushusertype(tolua_S,tolua_obj,"String");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #endif
- }
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'GetExtension'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* function: GetFileNameAndExtension */
- #ifndef TOLUA_DISABLE_tolua_IO_GetFileNameAndExtension00
- static int tolua_IO_GetFileNameAndExtension00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- (tolua_isvaluenil(tolua_S,1,&tolua_err) || !tolua_isusertype(tolua_S,1,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const String* fullPath = ((const String*) tolua_tousertype(tolua_S,1,0));
- {
- String tolua_ret = (String) GetFileNameAndExtension(*fullPath);
- {
- #ifdef __cplusplus
- void* tolua_obj = Mtolua_new((String)(tolua_ret));
- tolua_pushusertype(tolua_S,tolua_obj,"String");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #else
- void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(String));
- tolua_pushusertype(tolua_S,tolua_obj,"String");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #endif
- }
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'GetFileNameAndExtension'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* function: ReplaceExtension */
- #ifndef TOLUA_DISABLE_tolua_IO_ReplaceExtension00
- static int tolua_IO_ReplaceExtension00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- (tolua_isvaluenil(tolua_S,1,&tolua_err) || !tolua_isusertype(tolua_S,1,"const String",0,&tolua_err)) ||
- (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,3,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const String* fullPath = ((const String*) tolua_tousertype(tolua_S,1,0));
- const String* newExtension = ((const String*) tolua_tousertype(tolua_S,2,0));
- {
- String tolua_ret = (String) ReplaceExtension(*fullPath,*newExtension);
- {
- #ifdef __cplusplus
- void* tolua_obj = Mtolua_new((String)(tolua_ret));
- tolua_pushusertype(tolua_S,tolua_obj,"String");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #else
- void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(String));
- tolua_pushusertype(tolua_S,tolua_obj,"String");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #endif
- }
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'ReplaceExtension'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* function: AddTrailingSlash */
- #ifndef TOLUA_DISABLE_tolua_IO_AddTrailingSlash00
- static int tolua_IO_AddTrailingSlash00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- (tolua_isvaluenil(tolua_S,1,&tolua_err) || !tolua_isusertype(tolua_S,1,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const String* pathName = ((const String*) tolua_tousertype(tolua_S,1,0));
- {
- String tolua_ret = (String) AddTrailingSlash(*pathName);
- {
- #ifdef __cplusplus
- void* tolua_obj = Mtolua_new((String)(tolua_ret));
- tolua_pushusertype(tolua_S,tolua_obj,"String");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #else
- void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(String));
- tolua_pushusertype(tolua_S,tolua_obj,"String");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #endif
- }
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'AddTrailingSlash'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* function: RemoveTrailingSlash */
- #ifndef TOLUA_DISABLE_tolua_IO_RemoveTrailingSlash00
- static int tolua_IO_RemoveTrailingSlash00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- (tolua_isvaluenil(tolua_S,1,&tolua_err) || !tolua_isusertype(tolua_S,1,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const String* pathName = ((const String*) tolua_tousertype(tolua_S,1,0));
- {
- String tolua_ret = (String) RemoveTrailingSlash(*pathName);
- {
- #ifdef __cplusplus
- void* tolua_obj = Mtolua_new((String)(tolua_ret));
- tolua_pushusertype(tolua_S,tolua_obj,"String");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #else
- void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(String));
- tolua_pushusertype(tolua_S,tolua_obj,"String");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #endif
- }
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'RemoveTrailingSlash'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* function: GetParentPath */
- #ifndef TOLUA_DISABLE_tolua_IO_GetParentPath00
- static int tolua_IO_GetParentPath00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- (tolua_isvaluenil(tolua_S,1,&tolua_err) || !tolua_isusertype(tolua_S,1,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const String* pathName = ((const String*) tolua_tousertype(tolua_S,1,0));
- {
- String tolua_ret = (String) GetParentPath(*pathName);
- {
- #ifdef __cplusplus
- void* tolua_obj = Mtolua_new((String)(tolua_ret));
- tolua_pushusertype(tolua_S,tolua_obj,"String");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #else
- void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(String));
- tolua_pushusertype(tolua_S,tolua_obj,"String");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #endif
- }
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'GetParentPath'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* function: GetInternalPath */
- #ifndef TOLUA_DISABLE_tolua_IO_GetInternalPath00
- static int tolua_IO_GetInternalPath00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- (tolua_isvaluenil(tolua_S,1,&tolua_err) || !tolua_isusertype(tolua_S,1,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const String* pathName = ((const String*) tolua_tousertype(tolua_S,1,0));
- {
- String tolua_ret = (String) GetInternalPath(*pathName);
- {
- #ifdef __cplusplus
- void* tolua_obj = Mtolua_new((String)(tolua_ret));
- tolua_pushusertype(tolua_S,tolua_obj,"String");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #else
- void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(String));
- tolua_pushusertype(tolua_S,tolua_obj,"String");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #endif
- }
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'GetInternalPath'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* function: GetNativePath */
- #ifndef TOLUA_DISABLE_tolua_IO_GetNativePath00
- static int tolua_IO_GetNativePath00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- (tolua_isvaluenil(tolua_S,1,&tolua_err) || !tolua_isusertype(tolua_S,1,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const String* pathName = ((const String*) tolua_tousertype(tolua_S,1,0));
- {
- String tolua_ret = (String) GetNativePath(*pathName);
- {
- #ifdef __cplusplus
- void* tolua_obj = Mtolua_new((String)(tolua_ret));
- tolua_pushusertype(tolua_S,tolua_obj,"String");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #else
- void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(String));
- tolua_pushusertype(tolua_S,tolua_obj,"String");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #endif
- }
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'GetNativePath'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* get function: LOG_DEBUG */
- #ifndef TOLUA_DISABLE_tolua_get_LOG_DEBUG
- static int tolua_get_LOG_DEBUG(lua_State* tolua_S)
- {
- tolua_pushnumber(tolua_S,(lua_Number)LOG_DEBUG);
- return 1;
- }
- #endif //#ifndef TOLUA_DISABLE
- /* get function: LOG_INFO */
- #ifndef TOLUA_DISABLE_tolua_get_LOG_INFO
- static int tolua_get_LOG_INFO(lua_State* tolua_S)
- {
- tolua_pushnumber(tolua_S,(lua_Number)LOG_INFO);
- return 1;
- }
- #endif //#ifndef TOLUA_DISABLE
- /* get function: LOG_WARNING */
- #ifndef TOLUA_DISABLE_tolua_get_LOG_WARNING
- static int tolua_get_LOG_WARNING(lua_State* tolua_S)
- {
- tolua_pushnumber(tolua_S,(lua_Number)LOG_WARNING);
- return 1;
- }
- #endif //#ifndef TOLUA_DISABLE
- /* get function: LOG_ERROR */
- #ifndef TOLUA_DISABLE_tolua_get_LOG_ERROR
- static int tolua_get_LOG_ERROR(lua_State* tolua_S)
- {
- tolua_pushnumber(tolua_S,(lua_Number)LOG_ERROR);
- return 1;
- }
- #endif //#ifndef TOLUA_DISABLE
- /* get function: LOG_NONE */
- #ifndef TOLUA_DISABLE_tolua_get_LOG_NONE
- static int tolua_get_LOG_NONE(lua_State* tolua_S)
- {
- tolua_pushnumber(tolua_S,(lua_Number)LOG_NONE);
- return 1;
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: SetLevel of class Log */
- #ifndef TOLUA_DISABLE_tolua_IO_Log_SetLevel00
- static int tolua_IO_Log_SetLevel00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"Log",0,&tolua_err) ||
- !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,3,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- Log* self = (Log*) tolua_tousertype(tolua_S,1,0);
- int level = ((int) tolua_tonumber(tolua_S,2,0));
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetLevel'", NULL);
- #endif
- {
- self->SetLevel(level);
- }
- }
- return 0;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'SetLevel'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: SetTimeStamp of class Log */
- #ifndef TOLUA_DISABLE_tolua_IO_Log_SetTimeStamp00
- static int tolua_IO_Log_SetTimeStamp00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"Log",0,&tolua_err) ||
- !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,3,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- Log* self = (Log*) tolua_tousertype(tolua_S,1,0);
- bool enable = ((bool) tolua_toboolean(tolua_S,2,0));
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetTimeStamp'", NULL);
- #endif
- {
- self->SetTimeStamp(enable);
- }
- }
- return 0;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'SetTimeStamp'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: SetQuiet of class Log */
- #ifndef TOLUA_DISABLE_tolua_IO_Log_SetQuiet00
- static int tolua_IO_Log_SetQuiet00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"Log",0,&tolua_err) ||
- !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,3,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- Log* self = (Log*) tolua_tousertype(tolua_S,1,0);
- bool quiet = ((bool) tolua_toboolean(tolua_S,2,0));
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetQuiet'", NULL);
- #endif
- {
- self->SetQuiet(quiet);
- }
- }
- return 0;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'SetQuiet'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: GetLevel of class Log */
- #ifndef TOLUA_DISABLE_tolua_IO_Log_GetLevel00
- static int tolua_IO_Log_GetLevel00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"const Log",0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const Log* self = (const Log*) tolua_tousertype(tolua_S,1,0);
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetLevel'", NULL);
- #endif
- {
- int tolua_ret = (int) self->GetLevel();
- tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'GetLevel'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: GetTimeStamp of class Log */
- #ifndef TOLUA_DISABLE_tolua_IO_Log_GetTimeStamp00
- static int tolua_IO_Log_GetTimeStamp00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"const Log",0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const Log* self = (const Log*) tolua_tousertype(tolua_S,1,0);
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetTimeStamp'", NULL);
- #endif
- {
- bool tolua_ret = (bool) self->GetTimeStamp();
- tolua_pushboolean(tolua_S,(bool)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'GetTimeStamp'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: IsQuiet of class Log */
- #ifndef TOLUA_DISABLE_tolua_IO_Log_IsQuiet00
- static int tolua_IO_Log_IsQuiet00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"const Log",0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const Log* self = (const Log*) tolua_tousertype(tolua_S,1,0);
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsQuiet'", NULL);
- #endif
- {
- bool tolua_ret = (bool) self->IsQuiet();
- tolua_pushboolean(tolua_S,(bool)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'IsQuiet'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: Write of class Log */
- #ifndef TOLUA_DISABLE_tolua_IO_Log_Write00
- static int tolua_IO_Log_Write00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertable(tolua_S,1,"Log",0,&tolua_err) ||
- !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
- !tolua_isstring(tolua_S,3,0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,4,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- int level = ((int) tolua_tonumber(tolua_S,2,0));
- const char* message = ((const char*) tolua_tostring(tolua_S,3,0));
- {
- Log::Write(level,message);
- }
- }
- return 0;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'Write'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: WriteRaw of class Log */
- #ifndef TOLUA_DISABLE_tolua_IO_Log_WriteRaw00
- static int tolua_IO_Log_WriteRaw00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertable(tolua_S,1,"Log",0,&tolua_err) ||
- !tolua_isstring(tolua_S,2,0,&tolua_err) ||
- !tolua_isboolean(tolua_S,3,1,&tolua_err) ||
- !tolua_isnoobj(tolua_S,4,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const char* message = ((const char*) tolua_tostring(tolua_S,2,0));
- bool error = ((bool) tolua_toboolean(tolua_S,3,false));
- {
- Log::WriteRaw(message,error);
- }
- }
- return 0;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'WriteRaw'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* function: GetLog */
- #ifndef TOLUA_DISABLE_tolua_IO_GetLog00
- static int tolua_IO_GetLog00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isnoobj(tolua_S,1,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- {
- Log* tolua_ret = (Log*) GetLog();
- tolua_pushusertype(tolua_S,(void*)tolua_ret,"Log");
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'GetLog'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* get function: offset_ of class PackageEntry */
- #ifndef TOLUA_DISABLE_tolua_get_PackageEntry_offset_
- static int tolua_get_PackageEntry_offset_(lua_State* tolua_S)
- {
- PackageEntry* self = (PackageEntry*) tolua_tousertype(tolua_S,1,0);
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'offset_'",NULL);
- #endif
- tolua_pushnumber(tolua_S,(lua_Number)self->offset_);
- return 1;
- }
- #endif //#ifndef TOLUA_DISABLE
- /* set function: offset_ of class PackageEntry */
- #ifndef TOLUA_DISABLE_tolua_set_PackageEntry_offset_
- static int tolua_set_PackageEntry_offset_(lua_State* tolua_S)
- {
- PackageEntry* self = (PackageEntry*) tolua_tousertype(tolua_S,1,0);
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'offset_'",NULL);
- if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
- tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
- #endif
- self->offset_ = ((unsigned) tolua_tonumber(tolua_S,2,0))
- ;
- return 0;
- }
- #endif //#ifndef TOLUA_DISABLE
- /* get function: size_ of class PackageEntry */
- #ifndef TOLUA_DISABLE_tolua_get_PackageEntry_size_
- static int tolua_get_PackageEntry_size_(lua_State* tolua_S)
- {
- PackageEntry* self = (PackageEntry*) tolua_tousertype(tolua_S,1,0);
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'size_'",NULL);
- #endif
- tolua_pushnumber(tolua_S,(lua_Number)self->size_);
- return 1;
- }
- #endif //#ifndef TOLUA_DISABLE
- /* set function: size_ of class PackageEntry */
- #ifndef TOLUA_DISABLE_tolua_set_PackageEntry_size_
- static int tolua_set_PackageEntry_size_(lua_State* tolua_S)
- {
- PackageEntry* self = (PackageEntry*) tolua_tousertype(tolua_S,1,0);
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'size_'",NULL);
- if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
- tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
- #endif
- self->size_ = ((unsigned) tolua_tonumber(tolua_S,2,0))
- ;
- return 0;
- }
- #endif //#ifndef TOLUA_DISABLE
- /* get function: checksum_ of class PackageEntry */
- #ifndef TOLUA_DISABLE_tolua_get_PackageEntry_checksum_
- static int tolua_get_PackageEntry_checksum_(lua_State* tolua_S)
- {
- PackageEntry* self = (PackageEntry*) tolua_tousertype(tolua_S,1,0);
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'checksum_'",NULL);
- #endif
- tolua_pushnumber(tolua_S,(lua_Number)self->checksum_);
- return 1;
- }
- #endif //#ifndef TOLUA_DISABLE
- /* set function: checksum_ of class PackageEntry */
- #ifndef TOLUA_DISABLE_tolua_set_PackageEntry_checksum_
- static int tolua_set_PackageEntry_checksum_(lua_State* tolua_S)
- {
- PackageEntry* self = (PackageEntry*) tolua_tousertype(tolua_S,1,0);
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'checksum_'",NULL);
- if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
- tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
- #endif
- self->checksum_ = ((unsigned) tolua_tonumber(tolua_S,2,0))
- ;
- return 0;
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: Open of class PackageFile */
- #ifndef TOLUA_DISABLE_tolua_IO_PackageFile_Open00
- static int tolua_IO_PackageFile_Open00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"PackageFile",0,&tolua_err) ||
- (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,3,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- PackageFile* self = (PackageFile*) tolua_tousertype(tolua_S,1,0);
- const String* fileName = ((const String*) tolua_tousertype(tolua_S,2,0));
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Open'", NULL);
- #endif
- {
- bool tolua_ret = (bool) self->Open(*fileName);
- tolua_pushboolean(tolua_S,(bool)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'Open'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: Exists of class PackageFile */
- #ifndef TOLUA_DISABLE_tolua_IO_PackageFile_Exists00
- static int tolua_IO_PackageFile_Exists00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"const PackageFile",0,&tolua_err) ||
- (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,3,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const PackageFile* self = (const PackageFile*) tolua_tousertype(tolua_S,1,0);
- const String* fileName = ((const String*) tolua_tousertype(tolua_S,2,0));
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Exists'", NULL);
- #endif
- {
- bool tolua_ret = (bool) self->Exists(*fileName);
- tolua_pushboolean(tolua_S,(bool)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'Exists'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: GetEntry of class PackageFile */
- #ifndef TOLUA_DISABLE_tolua_IO_PackageFile_GetEntry00
- static int tolua_IO_PackageFile_GetEntry00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"const PackageFile",0,&tolua_err) ||
- (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
- !tolua_isnoobj(tolua_S,3,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const PackageFile* self = (const PackageFile*) tolua_tousertype(tolua_S,1,0);
- const String* fileName = ((const String*) tolua_tousertype(tolua_S,2,0));
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetEntry'", NULL);
- #endif
- {
- const PackageEntry* tolua_ret = (const PackageEntry*) self->GetEntry(*fileName);
- tolua_pushusertype(tolua_S,(void*)tolua_ret,"const PackageEntry");
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'GetEntry'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: GetName of class PackageFile */
- #ifndef TOLUA_DISABLE_tolua_IO_PackageFile_GetName00
- static int tolua_IO_PackageFile_GetName00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"const PackageFile",0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const PackageFile* self = (const PackageFile*) tolua_tousertype(tolua_S,1,0);
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetName'", NULL);
- #endif
- {
- const String& tolua_ret = (const String&) self->GetName();
- tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const String");
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'GetName'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: GetNameHash of class PackageFile */
- #ifndef TOLUA_DISABLE_tolua_IO_PackageFile_GetNameHash00
- static int tolua_IO_PackageFile_GetNameHash00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"const PackageFile",0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const PackageFile* self = (const PackageFile*) tolua_tousertype(tolua_S,1,0);
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetNameHash'", NULL);
- #endif
- {
- StringHash tolua_ret = (StringHash) self->GetNameHash();
- {
- #ifdef __cplusplus
- void* tolua_obj = Mtolua_new((StringHash)(tolua_ret));
- tolua_pushusertype(tolua_S,tolua_obj,"StringHash");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #else
- void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(StringHash));
- tolua_pushusertype(tolua_S,tolua_obj,"StringHash");
- tolua_register_gc(tolua_S,lua_gettop(tolua_S));
- #endif
- }
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'GetNameHash'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: GetNumFiles of class PackageFile */
- #ifndef TOLUA_DISABLE_tolua_IO_PackageFile_GetNumFiles00
- static int tolua_IO_PackageFile_GetNumFiles00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"const PackageFile",0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const PackageFile* self = (const PackageFile*) tolua_tousertype(tolua_S,1,0);
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetNumFiles'", NULL);
- #endif
- {
- unsigned tolua_ret = (unsigned) self->GetNumFiles();
- tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'GetNumFiles'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: GetTotalSize of class PackageFile */
- #ifndef TOLUA_DISABLE_tolua_IO_PackageFile_GetTotalSize00
- static int tolua_IO_PackageFile_GetTotalSize00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"const PackageFile",0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const PackageFile* self = (const PackageFile*) tolua_tousertype(tolua_S,1,0);
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetTotalSize'", NULL);
- #endif
- {
- unsigned tolua_ret = (unsigned) self->GetTotalSize();
- tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'GetTotalSize'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* method: GetChecksum of class PackageFile */
- #ifndef TOLUA_DISABLE_tolua_IO_PackageFile_GetChecksum00
- static int tolua_IO_PackageFile_GetChecksum00(lua_State* tolua_S)
- {
- #ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"const PackageFile",0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
- goto tolua_lerror;
- else
- #endif
- {
- const PackageFile* self = (const PackageFile*) tolua_tousertype(tolua_S,1,0);
- #ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetChecksum'", NULL);
- #endif
- {
- unsigned tolua_ret = (unsigned) self->GetChecksum();
- tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
- }
- }
- return 1;
- #ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'GetChecksum'.",&tolua_err);
- return 0;
- #endif
- }
- #endif //#ifndef TOLUA_DISABLE
- /* Open function */
- TOLUA_API int tolua_IO_open (lua_State* tolua_S)
- {
- tolua_open(tolua_S);
- tolua_reg_types(tolua_S);
- tolua_module(tolua_S,NULL,1);
- tolua_beginmodule(tolua_S,NULL);
- tolua_constant(tolua_S,"FILE_READ",FILE_READ);
- tolua_constant(tolua_S,"FILE_WRITE",FILE_WRITE);
- tolua_constant(tolua_S,"FILE_READWRITE",FILE_READWRITE);
- tolua_cclass(tolua_S,"File","File","Deserializer",NULL);
- tolua_beginmodule(tolua_S,"File");
- tolua_function(tolua_S,"Read",tolua_IO_File_Read00);
- tolua_function(tolua_S,"Seek",tolua_IO_File_Seek00);
- tolua_function(tolua_S,"GetName",tolua_IO_File_GetName00);
- tolua_function(tolua_S,"GetChecksum",tolua_IO_File_GetChecksum00);
- tolua_function(tolua_S,"Open",tolua_IO_File_Open00);
- tolua_function(tolua_S,"Open",tolua_IO_File_Open01);
- tolua_function(tolua_S,"Close",tolua_IO_File_Close00);
- tolua_function(tolua_S,"Flush",tolua_IO_File_Flush00);
- tolua_function(tolua_S,"SetName",tolua_IO_File_SetName00);
- tolua_function(tolua_S,"GetMode",tolua_IO_File_GetMode00);
- tolua_function(tolua_S,"IsOpen",tolua_IO_File_IsOpen00);
- tolua_function(tolua_S,"GetHandle",tolua_IO_File_GetHandle00);
- tolua_function(tolua_S,"IsPackaged",tolua_IO_File_IsPackaged00);
- tolua_endmodule(tolua_S);
- tolua_variable(tolua_S,"SCAN_FILES",tolua_get_SCAN_FILES,NULL);
- tolua_variable(tolua_S,"SCAN_DIRS",tolua_get_SCAN_DIRS,NULL);
- tolua_variable(tolua_S,"SCAN_HIDDEN",tolua_get_SCAN_HIDDEN,NULL);
- tolua_cclass(tolua_S,"FileSystem","FileSystem","Object",NULL);
- tolua_beginmodule(tolua_S,"FileSystem");
- tolua_function(tolua_S,"SetCurrentDir",tolua_IO_FileSystem_SetCurrentDir00);
- tolua_function(tolua_S,"CreateDir",tolua_IO_FileSystem_CreateDir00);
- tolua_function(tolua_S,"SystemCommand",tolua_IO_FileSystem_SystemCommand00);
- tolua_function(tolua_S,"SystemOpen",tolua_IO_FileSystem_SystemOpen00);
- tolua_function(tolua_S,"SystemOpen",tolua_IO_FileSystem_SystemOpen01);
- tolua_function(tolua_S,"Copy",tolua_IO_FileSystem_Copy00);
- tolua_function(tolua_S,"Rename",tolua_IO_FileSystem_Rename00);
- tolua_function(tolua_S,"Delete",tolua_IO_FileSystem_Delete00);
- tolua_function(tolua_S,"RegisterPath",tolua_IO_FileSystem_RegisterPath00);
- tolua_function(tolua_S,"GetCurrentDir",tolua_IO_FileSystem_GetCurrentDir00);
- tolua_function(tolua_S,"HasRegisteredPaths",tolua_IO_FileSystem_HasRegisteredPaths00);
- tolua_function(tolua_S,"CheckAccess",tolua_IO_FileSystem_CheckAccess00);
- tolua_function(tolua_S,"GetLastModifiedTime",tolua_IO_FileSystem_GetLastModifiedTime00);
- tolua_function(tolua_S,"FileExists",tolua_IO_FileSystem_FileExists00);
- tolua_function(tolua_S,"DirExists",tolua_IO_FileSystem_DirExists00);
- tolua_function(tolua_S,"GetProgramDir",tolua_IO_FileSystem_GetProgramDir00);
- tolua_function(tolua_S,"GetUserDocumentsDir",tolua_IO_FileSystem_GetUserDocumentsDir00);
- tolua_endmodule(tolua_S);
- tolua_function(tolua_S,"GetFileSystem",tolua_IO_GetFileSystem00);
- tolua_function(tolua_S,"SplitPath",tolua_IO_SplitPath00);
- tolua_function(tolua_S,"GetPath",tolua_IO_GetPath00);
- tolua_function(tolua_S,"GetFileName",tolua_IO_GetFileName00);
- tolua_function(tolua_S,"GetExtension",tolua_IO_GetExtension00);
- tolua_function(tolua_S,"GetFileNameAndExtension",tolua_IO_GetFileNameAndExtension00);
- tolua_function(tolua_S,"ReplaceExtension",tolua_IO_ReplaceExtension00);
- tolua_function(tolua_S,"AddTrailingSlash",tolua_IO_AddTrailingSlash00);
- tolua_function(tolua_S,"RemoveTrailingSlash",tolua_IO_RemoveTrailingSlash00);
- tolua_function(tolua_S,"GetParentPath",tolua_IO_GetParentPath00);
- tolua_function(tolua_S,"GetInternalPath",tolua_IO_GetInternalPath00);
- tolua_function(tolua_S,"GetNativePath",tolua_IO_GetNativePath00);
- tolua_variable(tolua_S,"LOG_DEBUG",tolua_get_LOG_DEBUG,NULL);
- tolua_variable(tolua_S,"LOG_INFO",tolua_get_LOG_INFO,NULL);
- tolua_variable(tolua_S,"LOG_WARNING",tolua_get_LOG_WARNING,NULL);
- tolua_variable(tolua_S,"LOG_ERROR",tolua_get_LOG_ERROR,NULL);
- tolua_variable(tolua_S,"LOG_NONE",tolua_get_LOG_NONE,NULL);
- tolua_cclass(tolua_S,"Log","Log","Object",NULL);
- tolua_beginmodule(tolua_S,"Log");
- tolua_function(tolua_S,"SetLevel",tolua_IO_Log_SetLevel00);
- tolua_function(tolua_S,"SetTimeStamp",tolua_IO_Log_SetTimeStamp00);
- tolua_function(tolua_S,"SetQuiet",tolua_IO_Log_SetQuiet00);
- tolua_function(tolua_S,"GetLevel",tolua_IO_Log_GetLevel00);
- tolua_function(tolua_S,"GetTimeStamp",tolua_IO_Log_GetTimeStamp00);
- tolua_function(tolua_S,"IsQuiet",tolua_IO_Log_IsQuiet00);
- tolua_function(tolua_S,"Write",tolua_IO_Log_Write00);
- tolua_function(tolua_S,"WriteRaw",tolua_IO_Log_WriteRaw00);
- tolua_endmodule(tolua_S);
- tolua_function(tolua_S,"GetLog",tolua_IO_GetLog00);
- tolua_cclass(tolua_S,"PackageEntry","PackageEntry","",NULL);
- tolua_beginmodule(tolua_S,"PackageEntry");
- tolua_variable(tolua_S,"offset_",tolua_get_PackageEntry_offset_,tolua_set_PackageEntry_offset_);
- tolua_variable(tolua_S,"size_",tolua_get_PackageEntry_size_,tolua_set_PackageEntry_size_);
- tolua_variable(tolua_S,"checksum_",tolua_get_PackageEntry_checksum_,tolua_set_PackageEntry_checksum_);
- tolua_endmodule(tolua_S);
- tolua_cclass(tolua_S,"PackageFile","PackageFile","Object",NULL);
- tolua_beginmodule(tolua_S,"PackageFile");
- tolua_function(tolua_S,"Open",tolua_IO_PackageFile_Open00);
- tolua_function(tolua_S,"Exists",tolua_IO_PackageFile_Exists00);
- tolua_function(tolua_S,"GetEntry",tolua_IO_PackageFile_GetEntry00);
- tolua_function(tolua_S,"GetName",tolua_IO_PackageFile_GetName00);
- tolua_function(tolua_S,"GetNameHash",tolua_IO_PackageFile_GetNameHash00);
- tolua_function(tolua_S,"GetNumFiles",tolua_IO_PackageFile_GetNumFiles00);
- tolua_function(tolua_S,"GetTotalSize",tolua_IO_PackageFile_GetTotalSize00);
- tolua_function(tolua_S,"GetChecksum",tolua_IO_PackageFile_GetChecksum00);
- tolua_endmodule(tolua_S);
- tolua_endmodule(tolua_S);
- return 1;
- }
- #if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501
- TOLUA_API int luaopen_IO (lua_State* tolua_S) {
- return tolua_IO_open(tolua_S);
- };
- #endif
|