ResourceLuaAPI.cpp 87 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823
  1. /*
  2. ** Lua binding: Resource
  3. ** Generated automatically by tolua++-1.0.92 on 06/30/13 11:31:51.
  4. */
  5. //
  6. // Copyright (c) 2008-2013 the Urho3D project.
  7. //
  8. // Permission is hereby granted, free of charge, to any person obtaining a copy
  9. // of this software and associated documentation files (the "Software"), to deal
  10. // in the Software without restriction, including without limitation the rights
  11. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  12. // copies of the Software, and to permit persons to whom the Software is
  13. // furnished to do so, subject to the following conditions:
  14. //
  15. // The above copyright notice and this permission notice shall be included in
  16. // all copies or substantial portions of the Software.
  17. //
  18. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  19. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  20. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  21. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  22. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  23. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  24. // THE SOFTWARE.
  25. //
  26. #include "Precompiled.h"
  27. #include "tolua++.h"
  28. /* Exported function */
  29. TOLUA_API int tolua_Resource_open (lua_State* tolua_S);
  30. #define TOLUA_RELEASE
  31. #include "ResourceLuaAPI.h"
  32. #include "Image.h"
  33. #include "Resource.h"
  34. #include "ResourceCache.h"
  35. #include "XMLElement.h"
  36. #include "XMLFile.h"
  37. using namespace Urho3D;
  38. #pragma warning(disable:4800)
  39. /* function to release collected object via destructor */
  40. #ifdef __cplusplus
  41. static int tolua_collect_String (lua_State* tolua_S)
  42. {
  43. String* self = (String*) tolua_tousertype(tolua_S,1,0);
  44. Mtolua_delete(self);
  45. return 0;
  46. }
  47. static int tolua_collect_IntRect (lua_State* tolua_S)
  48. {
  49. IntRect* self = (IntRect*) tolua_tousertype(tolua_S,1,0);
  50. Mtolua_delete(self);
  51. return 0;
  52. }
  53. static int tolua_collect_Color (lua_State* tolua_S)
  54. {
  55. Color* self = (Color*) tolua_tousertype(tolua_S,1,0);
  56. Mtolua_delete(self);
  57. return 0;
  58. }
  59. static int tolua_collect_Vector4 (lua_State* tolua_S)
  60. {
  61. Vector4* self = (Vector4*) tolua_tousertype(tolua_S,1,0);
  62. Mtolua_delete(self);
  63. return 0;
  64. }
  65. static int tolua_collect_Vector3 (lua_State* tolua_S)
  66. {
  67. Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0);
  68. Mtolua_delete(self);
  69. return 0;
  70. }
  71. static int tolua_collect_StringHash (lua_State* tolua_S)
  72. {
  73. StringHash* self = (StringHash*) tolua_tousertype(tolua_S,1,0);
  74. Mtolua_delete(self);
  75. return 0;
  76. }
  77. static int tolua_collect_ResourceRef (lua_State* tolua_S)
  78. {
  79. ResourceRef* self = (ResourceRef*) tolua_tousertype(tolua_S,1,0);
  80. Mtolua_delete(self);
  81. return 0;
  82. }
  83. static int tolua_collect_Rect (lua_State* tolua_S)
  84. {
  85. Rect* self = (Rect*) tolua_tousertype(tolua_S,1,0);
  86. Mtolua_delete(self);
  87. return 0;
  88. }
  89. static int tolua_collect_ResourceRefList (lua_State* tolua_S)
  90. {
  91. ResourceRefList* self = (ResourceRefList*) tolua_tousertype(tolua_S,1,0);
  92. Mtolua_delete(self);
  93. return 0;
  94. }
  95. static int tolua_collect_Vector2 (lua_State* tolua_S)
  96. {
  97. Vector2* self = (Vector2*) tolua_tousertype(tolua_S,1,0);
  98. Mtolua_delete(self);
  99. return 0;
  100. }
  101. static int tolua_collect_Quaternion (lua_State* tolua_S)
  102. {
  103. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  104. Mtolua_delete(self);
  105. return 0;
  106. }
  107. static int tolua_collect_IntVector2 (lua_State* tolua_S)
  108. {
  109. IntVector2* self = (IntVector2*) tolua_tousertype(tolua_S,1,0);
  110. Mtolua_delete(self);
  111. return 0;
  112. }
  113. static int tolua_collect_BoundingBox (lua_State* tolua_S)
  114. {
  115. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  116. Mtolua_delete(self);
  117. return 0;
  118. }
  119. static int tolua_collect_XMLElement (lua_State* tolua_S)
  120. {
  121. XMLElement* self = (XMLElement*) tolua_tousertype(tolua_S,1,0);
  122. Mtolua_delete(self);
  123. return 0;
  124. }
  125. #endif
  126. /* function to register type */
  127. static void tolua_reg_types (lua_State* tolua_S)
  128. {
  129. tolua_usertype(tolua_S,"String");
  130. tolua_usertype(tolua_S,"Resource");
  131. tolua_usertype(tolua_S,"Color");
  132. tolua_usertype(tolua_S,"XMLFile");
  133. tolua_usertype(tolua_S,"Image");
  134. tolua_usertype(tolua_S,"Vector4");
  135. tolua_usertype(tolua_S,"Vector3");
  136. tolua_usertype(tolua_S,"Vector2");
  137. tolua_usertype(tolua_S,"Material");
  138. tolua_usertype(tolua_S,"Sound");
  139. tolua_usertype(tolua_S,"BoundingBox");
  140. tolua_usertype(tolua_S,"XMLElement");
  141. tolua_usertype(tolua_S,"ResourceRef");
  142. tolua_usertype(tolua_S,"ResourceCache");
  143. tolua_usertype(tolua_S,"Animation");
  144. tolua_usertype(tolua_S,"Quaternion");
  145. tolua_usertype(tolua_S,"Rect");
  146. tolua_usertype(tolua_S,"IntVector2");
  147. tolua_usertype(tolua_S,"StringHash");
  148. tolua_usertype(tolua_S,"IntRect");
  149. tolua_usertype(tolua_S,"Font");
  150. tolua_usertype(tolua_S,"ResourceRefList");
  151. tolua_usertype(tolua_S,"Model");
  152. tolua_usertype(tolua_S,"Technique");
  153. tolua_usertype(tolua_S,"TextureCube");
  154. tolua_usertype(tolua_S,"Texture2D");
  155. tolua_usertype(tolua_S,"ShortStringHash");
  156. }
  157. /* method: FlipVertical of class Image */
  158. #ifndef TOLUA_DISABLE_tolua_Resource_Image_FlipVertical00
  159. static int tolua_Resource_Image_FlipVertical00(lua_State* tolua_S)
  160. {
  161. #ifndef TOLUA_RELEASE
  162. tolua_Error tolua_err;
  163. if (
  164. !tolua_isusertype(tolua_S,1,"Image",0,&tolua_err) ||
  165. !tolua_isnoobj(tolua_S,2,&tolua_err)
  166. )
  167. goto tolua_lerror;
  168. else
  169. #endif
  170. {
  171. Image* self = (Image*) tolua_tousertype(tolua_S,1,0);
  172. #ifndef TOLUA_RELEASE
  173. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FlipVertical'", NULL);
  174. #endif
  175. {
  176. self->FlipVertical();
  177. }
  178. }
  179. return 0;
  180. #ifndef TOLUA_RELEASE
  181. tolua_lerror:
  182. tolua_error(tolua_S,"#ferror in function 'FlipVertical'.",&tolua_err);
  183. return 0;
  184. #endif
  185. }
  186. #endif //#ifndef TOLUA_DISABLE
  187. /* method: SaveBMP of class Image */
  188. #ifndef TOLUA_DISABLE_tolua_Resource_Image_SaveBMP00
  189. static int tolua_Resource_Image_SaveBMP00(lua_State* tolua_S)
  190. {
  191. #ifndef TOLUA_RELEASE
  192. tolua_Error tolua_err;
  193. if (
  194. !tolua_isusertype(tolua_S,1,"Image",0,&tolua_err) ||
  195. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  196. !tolua_isnoobj(tolua_S,3,&tolua_err)
  197. )
  198. goto tolua_lerror;
  199. else
  200. #endif
  201. {
  202. Image* self = (Image*) tolua_tousertype(tolua_S,1,0);
  203. const char* fileName = ((const char*) tolua_tostring(tolua_S,2,0));
  204. #ifndef TOLUA_RELEASE
  205. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SaveBMP'", NULL);
  206. #endif
  207. {
  208. bool tolua_ret = (bool) self->SaveBMP(fileName);
  209. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  210. }
  211. }
  212. return 1;
  213. #ifndef TOLUA_RELEASE
  214. tolua_lerror:
  215. tolua_error(tolua_S,"#ferror in function 'SaveBMP'.",&tolua_err);
  216. return 0;
  217. #endif
  218. }
  219. #endif //#ifndef TOLUA_DISABLE
  220. /* method: SavePNG of class Image */
  221. #ifndef TOLUA_DISABLE_tolua_Resource_Image_SavePNG00
  222. static int tolua_Resource_Image_SavePNG00(lua_State* tolua_S)
  223. {
  224. #ifndef TOLUA_RELEASE
  225. tolua_Error tolua_err;
  226. if (
  227. !tolua_isusertype(tolua_S,1,"Image",0,&tolua_err) ||
  228. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  229. !tolua_isnoobj(tolua_S,3,&tolua_err)
  230. )
  231. goto tolua_lerror;
  232. else
  233. #endif
  234. {
  235. Image* self = (Image*) tolua_tousertype(tolua_S,1,0);
  236. const char* fileName = ((const char*) tolua_tostring(tolua_S,2,0));
  237. #ifndef TOLUA_RELEASE
  238. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SavePNG'", NULL);
  239. #endif
  240. {
  241. bool tolua_ret = (bool) self->SavePNG(fileName);
  242. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  243. }
  244. }
  245. return 1;
  246. #ifndef TOLUA_RELEASE
  247. tolua_lerror:
  248. tolua_error(tolua_S,"#ferror in function 'SavePNG'.",&tolua_err);
  249. return 0;
  250. #endif
  251. }
  252. #endif //#ifndef TOLUA_DISABLE
  253. /* method: SaveTGA of class Image */
  254. #ifndef TOLUA_DISABLE_tolua_Resource_Image_SaveTGA00
  255. static int tolua_Resource_Image_SaveTGA00(lua_State* tolua_S)
  256. {
  257. #ifndef TOLUA_RELEASE
  258. tolua_Error tolua_err;
  259. if (
  260. !tolua_isusertype(tolua_S,1,"Image",0,&tolua_err) ||
  261. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  262. !tolua_isnoobj(tolua_S,3,&tolua_err)
  263. )
  264. goto tolua_lerror;
  265. else
  266. #endif
  267. {
  268. Image* self = (Image*) tolua_tousertype(tolua_S,1,0);
  269. const char* fileName = ((const char*) tolua_tostring(tolua_S,2,0));
  270. #ifndef TOLUA_RELEASE
  271. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SaveTGA'", NULL);
  272. #endif
  273. {
  274. bool tolua_ret = (bool) self->SaveTGA(fileName);
  275. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  276. }
  277. }
  278. return 1;
  279. #ifndef TOLUA_RELEASE
  280. tolua_lerror:
  281. tolua_error(tolua_S,"#ferror in function 'SaveTGA'.",&tolua_err);
  282. return 0;
  283. #endif
  284. }
  285. #endif //#ifndef TOLUA_DISABLE
  286. /* method: SaveJPG of class Image */
  287. #ifndef TOLUA_DISABLE_tolua_Resource_Image_SaveJPG00
  288. static int tolua_Resource_Image_SaveJPG00(lua_State* tolua_S)
  289. {
  290. #ifndef TOLUA_RELEASE
  291. tolua_Error tolua_err;
  292. if (
  293. !tolua_isusertype(tolua_S,1,"Image",0,&tolua_err) ||
  294. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  295. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  296. !tolua_isnoobj(tolua_S,4,&tolua_err)
  297. )
  298. goto tolua_lerror;
  299. else
  300. #endif
  301. {
  302. Image* self = (Image*) tolua_tousertype(tolua_S,1,0);
  303. const char* fileName = ((const char*) tolua_tostring(tolua_S,2,0));
  304. int quality = ((int) tolua_tonumber(tolua_S,3,0));
  305. #ifndef TOLUA_RELEASE
  306. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SaveJPG'", NULL);
  307. #endif
  308. {
  309. bool tolua_ret = (bool) self->SaveJPG(fileName,quality);
  310. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  311. }
  312. }
  313. return 1;
  314. #ifndef TOLUA_RELEASE
  315. tolua_lerror:
  316. tolua_error(tolua_S,"#ferror in function 'SaveJPG'.",&tolua_err);
  317. return 0;
  318. #endif
  319. }
  320. #endif //#ifndef TOLUA_DISABLE
  321. /* method: GetWidth of class Image */
  322. #ifndef TOLUA_DISABLE_tolua_Resource_Image_GetWidth00
  323. static int tolua_Resource_Image_GetWidth00(lua_State* tolua_S)
  324. {
  325. #ifndef TOLUA_RELEASE
  326. tolua_Error tolua_err;
  327. if (
  328. !tolua_isusertype(tolua_S,1,"const Image",0,&tolua_err) ||
  329. !tolua_isnoobj(tolua_S,2,&tolua_err)
  330. )
  331. goto tolua_lerror;
  332. else
  333. #endif
  334. {
  335. const Image* self = (const Image*) tolua_tousertype(tolua_S,1,0);
  336. #ifndef TOLUA_RELEASE
  337. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetWidth'", NULL);
  338. #endif
  339. {
  340. int tolua_ret = (int) self->GetWidth();
  341. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  342. }
  343. }
  344. return 1;
  345. #ifndef TOLUA_RELEASE
  346. tolua_lerror:
  347. tolua_error(tolua_S,"#ferror in function 'GetWidth'.",&tolua_err);
  348. return 0;
  349. #endif
  350. }
  351. #endif //#ifndef TOLUA_DISABLE
  352. /* method: GetHeight of class Image */
  353. #ifndef TOLUA_DISABLE_tolua_Resource_Image_GetHeight00
  354. static int tolua_Resource_Image_GetHeight00(lua_State* tolua_S)
  355. {
  356. #ifndef TOLUA_RELEASE
  357. tolua_Error tolua_err;
  358. if (
  359. !tolua_isusertype(tolua_S,1,"const Image",0,&tolua_err) ||
  360. !tolua_isnoobj(tolua_S,2,&tolua_err)
  361. )
  362. goto tolua_lerror;
  363. else
  364. #endif
  365. {
  366. const Image* self = (const Image*) tolua_tousertype(tolua_S,1,0);
  367. #ifndef TOLUA_RELEASE
  368. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetHeight'", NULL);
  369. #endif
  370. {
  371. int tolua_ret = (int) self->GetHeight();
  372. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  373. }
  374. }
  375. return 1;
  376. #ifndef TOLUA_RELEASE
  377. tolua_lerror:
  378. tolua_error(tolua_S,"#ferror in function 'GetHeight'.",&tolua_err);
  379. return 0;
  380. #endif
  381. }
  382. #endif //#ifndef TOLUA_DISABLE
  383. /* method: GetComponents of class Image */
  384. #ifndef TOLUA_DISABLE_tolua_Resource_Image_GetComponents00
  385. static int tolua_Resource_Image_GetComponents00(lua_State* tolua_S)
  386. {
  387. #ifndef TOLUA_RELEASE
  388. tolua_Error tolua_err;
  389. if (
  390. !tolua_isusertype(tolua_S,1,"const Image",0,&tolua_err) ||
  391. !tolua_isnoobj(tolua_S,2,&tolua_err)
  392. )
  393. goto tolua_lerror;
  394. else
  395. #endif
  396. {
  397. const Image* self = (const Image*) tolua_tousertype(tolua_S,1,0);
  398. #ifndef TOLUA_RELEASE
  399. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetComponents'", NULL);
  400. #endif
  401. {
  402. unsigned tolua_ret = (unsigned) self->GetComponents();
  403. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  404. }
  405. }
  406. return 1;
  407. #ifndef TOLUA_RELEASE
  408. tolua_lerror:
  409. tolua_error(tolua_S,"#ferror in function 'GetComponents'.",&tolua_err);
  410. return 0;
  411. #endif
  412. }
  413. #endif //#ifndef TOLUA_DISABLE
  414. /* method: IsCompressed of class Image */
  415. #ifndef TOLUA_DISABLE_tolua_Resource_Image_IsCompressed00
  416. static int tolua_Resource_Image_IsCompressed00(lua_State* tolua_S)
  417. {
  418. #ifndef TOLUA_RELEASE
  419. tolua_Error tolua_err;
  420. if (
  421. !tolua_isusertype(tolua_S,1,"const Image",0,&tolua_err) ||
  422. !tolua_isnoobj(tolua_S,2,&tolua_err)
  423. )
  424. goto tolua_lerror;
  425. else
  426. #endif
  427. {
  428. const Image* self = (const Image*) tolua_tousertype(tolua_S,1,0);
  429. #ifndef TOLUA_RELEASE
  430. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsCompressed'", NULL);
  431. #endif
  432. {
  433. bool tolua_ret = (bool) self->IsCompressed();
  434. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  435. }
  436. }
  437. return 1;
  438. #ifndef TOLUA_RELEASE
  439. tolua_lerror:
  440. tolua_error(tolua_S,"#ferror in function 'IsCompressed'.",&tolua_err);
  441. return 0;
  442. #endif
  443. }
  444. #endif //#ifndef TOLUA_DISABLE
  445. /* method: GetCompressedFormat of class Image */
  446. #ifndef TOLUA_DISABLE_tolua_Resource_Image_GetCompressedFormat00
  447. static int tolua_Resource_Image_GetCompressedFormat00(lua_State* tolua_S)
  448. {
  449. #ifndef TOLUA_RELEASE
  450. tolua_Error tolua_err;
  451. if (
  452. !tolua_isusertype(tolua_S,1,"const Image",0,&tolua_err) ||
  453. !tolua_isnoobj(tolua_S,2,&tolua_err)
  454. )
  455. goto tolua_lerror;
  456. else
  457. #endif
  458. {
  459. const Image* self = (const Image*) tolua_tousertype(tolua_S,1,0);
  460. #ifndef TOLUA_RELEASE
  461. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetCompressedFormat'", NULL);
  462. #endif
  463. {
  464. CompressedFormat tolua_ret = (CompressedFormat) self->GetCompressedFormat();
  465. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  466. }
  467. }
  468. return 1;
  469. #ifndef TOLUA_RELEASE
  470. tolua_lerror:
  471. tolua_error(tolua_S,"#ferror in function 'GetCompressedFormat'.",&tolua_err);
  472. return 0;
  473. #endif
  474. }
  475. #endif //#ifndef TOLUA_DISABLE
  476. /* method: SetName of class Resource */
  477. #ifndef TOLUA_DISABLE_tolua_Resource_Resource_SetName00
  478. static int tolua_Resource_Resource_SetName00(lua_State* tolua_S)
  479. {
  480. #ifndef TOLUA_RELEASE
  481. tolua_Error tolua_err;
  482. if (
  483. !tolua_isusertype(tolua_S,1,"Resource",0,&tolua_err) ||
  484. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
  485. !tolua_isnoobj(tolua_S,3,&tolua_err)
  486. )
  487. goto tolua_lerror;
  488. else
  489. #endif
  490. {
  491. Resource* self = (Resource*) tolua_tousertype(tolua_S,1,0);
  492. const String* name = ((const String*) tolua_tousertype(tolua_S,2,0));
  493. #ifndef TOLUA_RELEASE
  494. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetName'", NULL);
  495. #endif
  496. {
  497. self->SetName(*name);
  498. }
  499. }
  500. return 0;
  501. #ifndef TOLUA_RELEASE
  502. tolua_lerror:
  503. tolua_error(tolua_S,"#ferror in function 'SetName'.",&tolua_err);
  504. return 0;
  505. #endif
  506. }
  507. #endif //#ifndef TOLUA_DISABLE
  508. /* method: GetName of class Resource */
  509. #ifndef TOLUA_DISABLE_tolua_Resource_Resource_GetName00
  510. static int tolua_Resource_Resource_GetName00(lua_State* tolua_S)
  511. {
  512. #ifndef TOLUA_RELEASE
  513. tolua_Error tolua_err;
  514. if (
  515. !tolua_isusertype(tolua_S,1,"const Resource",0,&tolua_err) ||
  516. !tolua_isnoobj(tolua_S,2,&tolua_err)
  517. )
  518. goto tolua_lerror;
  519. else
  520. #endif
  521. {
  522. const Resource* self = (const Resource*) tolua_tousertype(tolua_S,1,0);
  523. #ifndef TOLUA_RELEASE
  524. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetName'", NULL);
  525. #endif
  526. {
  527. const String& tolua_ret = (const String&) self->GetName();
  528. tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const String");
  529. }
  530. }
  531. return 1;
  532. #ifndef TOLUA_RELEASE
  533. tolua_lerror:
  534. tolua_error(tolua_S,"#ferror in function 'GetName'.",&tolua_err);
  535. return 0;
  536. #endif
  537. }
  538. #endif //#ifndef TOLUA_DISABLE
  539. /* method: GetNameHash of class Resource */
  540. #ifndef TOLUA_DISABLE_tolua_Resource_Resource_GetNameHash00
  541. static int tolua_Resource_Resource_GetNameHash00(lua_State* tolua_S)
  542. {
  543. #ifndef TOLUA_RELEASE
  544. tolua_Error tolua_err;
  545. if (
  546. !tolua_isusertype(tolua_S,1,"const Resource",0,&tolua_err) ||
  547. !tolua_isnoobj(tolua_S,2,&tolua_err)
  548. )
  549. goto tolua_lerror;
  550. else
  551. #endif
  552. {
  553. const Resource* self = (const Resource*) tolua_tousertype(tolua_S,1,0);
  554. #ifndef TOLUA_RELEASE
  555. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetNameHash'", NULL);
  556. #endif
  557. {
  558. StringHash tolua_ret = (StringHash) self->GetNameHash();
  559. {
  560. #ifdef __cplusplus
  561. void* tolua_obj = Mtolua_new((StringHash)(tolua_ret));
  562. tolua_pushusertype(tolua_S,tolua_obj,"StringHash");
  563. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  564. #else
  565. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(StringHash));
  566. tolua_pushusertype(tolua_S,tolua_obj,"StringHash");
  567. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  568. #endif
  569. }
  570. }
  571. }
  572. return 1;
  573. #ifndef TOLUA_RELEASE
  574. tolua_lerror:
  575. tolua_error(tolua_S,"#ferror in function 'GetNameHash'.",&tolua_err);
  576. return 0;
  577. #endif
  578. }
  579. #endif //#ifndef TOLUA_DISABLE
  580. /* method: GetMemoryUse of class Resource */
  581. #ifndef TOLUA_DISABLE_tolua_Resource_Resource_GetMemoryUse00
  582. static int tolua_Resource_Resource_GetMemoryUse00(lua_State* tolua_S)
  583. {
  584. #ifndef TOLUA_RELEASE
  585. tolua_Error tolua_err;
  586. if (
  587. !tolua_isusertype(tolua_S,1,"const Resource",0,&tolua_err) ||
  588. !tolua_isnoobj(tolua_S,2,&tolua_err)
  589. )
  590. goto tolua_lerror;
  591. else
  592. #endif
  593. {
  594. const Resource* self = (const Resource*) tolua_tousertype(tolua_S,1,0);
  595. #ifndef TOLUA_RELEASE
  596. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetMemoryUse'", NULL);
  597. #endif
  598. {
  599. unsigned tolua_ret = (unsigned) self->GetMemoryUse();
  600. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  601. }
  602. }
  603. return 1;
  604. #ifndef TOLUA_RELEASE
  605. tolua_lerror:
  606. tolua_error(tolua_S,"#ferror in function 'GetMemoryUse'.",&tolua_err);
  607. return 0;
  608. #endif
  609. }
  610. #endif //#ifndef TOLUA_DISABLE
  611. /* method: ReleaseAllResources of class ResourceCache */
  612. #ifndef TOLUA_DISABLE_tolua_Resource_ResourceCache_ReleaseAllResources00
  613. static int tolua_Resource_ResourceCache_ReleaseAllResources00(lua_State* tolua_S)
  614. {
  615. #ifndef TOLUA_RELEASE
  616. tolua_Error tolua_err;
  617. if (
  618. !tolua_isusertype(tolua_S,1,"ResourceCache",0,&tolua_err) ||
  619. !tolua_isboolean(tolua_S,2,1,&tolua_err) ||
  620. !tolua_isnoobj(tolua_S,3,&tolua_err)
  621. )
  622. goto tolua_lerror;
  623. else
  624. #endif
  625. {
  626. ResourceCache* self = (ResourceCache*) tolua_tousertype(tolua_S,1,0);
  627. bool force = ((bool) tolua_toboolean(tolua_S,2,false));
  628. #ifndef TOLUA_RELEASE
  629. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ReleaseAllResources'", NULL);
  630. #endif
  631. {
  632. self->ReleaseAllResources(force);
  633. }
  634. }
  635. return 0;
  636. #ifndef TOLUA_RELEASE
  637. tolua_lerror:
  638. tolua_error(tolua_S,"#ferror in function 'ReleaseAllResources'.",&tolua_err);
  639. return 0;
  640. #endif
  641. }
  642. #endif //#ifndef TOLUA_DISABLE
  643. /* method: ReloadResource of class ResourceCache */
  644. #ifndef TOLUA_DISABLE_tolua_Resource_ResourceCache_ReloadResource00
  645. static int tolua_Resource_ResourceCache_ReloadResource00(lua_State* tolua_S)
  646. {
  647. #ifndef TOLUA_RELEASE
  648. tolua_Error tolua_err;
  649. if (
  650. !tolua_isusertype(tolua_S,1,"ResourceCache",0,&tolua_err) ||
  651. !tolua_isusertype(tolua_S,2,"Resource",0,&tolua_err) ||
  652. !tolua_isnoobj(tolua_S,3,&tolua_err)
  653. )
  654. goto tolua_lerror;
  655. else
  656. #endif
  657. {
  658. ResourceCache* self = (ResourceCache*) tolua_tousertype(tolua_S,1,0);
  659. Resource* resource = ((Resource*) tolua_tousertype(tolua_S,2,0));
  660. #ifndef TOLUA_RELEASE
  661. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ReloadResource'", NULL);
  662. #endif
  663. {
  664. bool tolua_ret = (bool) self->ReloadResource(resource);
  665. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  666. }
  667. }
  668. return 1;
  669. #ifndef TOLUA_RELEASE
  670. tolua_lerror:
  671. tolua_error(tolua_S,"#ferror in function 'ReloadResource'.",&tolua_err);
  672. return 0;
  673. #endif
  674. }
  675. #endif //#ifndef TOLUA_DISABLE
  676. /* method: SetMemoryBudget of class ResourceCache */
  677. #ifndef TOLUA_DISABLE_tolua_Resource_ResourceCache_SetMemoryBudget00
  678. static int tolua_Resource_ResourceCache_SetMemoryBudget00(lua_State* tolua_S)
  679. {
  680. #ifndef TOLUA_RELEASE
  681. tolua_Error tolua_err;
  682. if (
  683. !tolua_isusertype(tolua_S,1,"ResourceCache",0,&tolua_err) ||
  684. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"ShortStringHash",0,&tolua_err)) ||
  685. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  686. !tolua_isnoobj(tolua_S,4,&tolua_err)
  687. )
  688. goto tolua_lerror;
  689. else
  690. #endif
  691. {
  692. ResourceCache* self = (ResourceCache*) tolua_tousertype(tolua_S,1,0);
  693. ShortStringHash type = *((ShortStringHash*) tolua_tousertype(tolua_S,2,0));
  694. unsigned budget = ((unsigned) tolua_tonumber(tolua_S,3,0));
  695. #ifndef TOLUA_RELEASE
  696. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetMemoryBudget'", NULL);
  697. #endif
  698. {
  699. self->SetMemoryBudget(type,budget);
  700. }
  701. }
  702. return 0;
  703. #ifndef TOLUA_RELEASE
  704. tolua_lerror:
  705. tolua_error(tolua_S,"#ferror in function 'SetMemoryBudget'.",&tolua_err);
  706. return 0;
  707. #endif
  708. }
  709. #endif //#ifndef TOLUA_DISABLE
  710. /* method: SetAutoReloadResources of class ResourceCache */
  711. #ifndef TOLUA_DISABLE_tolua_Resource_ResourceCache_SetAutoReloadResources00
  712. static int tolua_Resource_ResourceCache_SetAutoReloadResources00(lua_State* tolua_S)
  713. {
  714. #ifndef TOLUA_RELEASE
  715. tolua_Error tolua_err;
  716. if (
  717. !tolua_isusertype(tolua_S,1,"ResourceCache",0,&tolua_err) ||
  718. !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
  719. !tolua_isnoobj(tolua_S,3,&tolua_err)
  720. )
  721. goto tolua_lerror;
  722. else
  723. #endif
  724. {
  725. ResourceCache* self = (ResourceCache*) tolua_tousertype(tolua_S,1,0);
  726. bool enable = ((bool) tolua_toboolean(tolua_S,2,0));
  727. #ifndef TOLUA_RELEASE
  728. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetAutoReloadResources'", NULL);
  729. #endif
  730. {
  731. self->SetAutoReloadResources(enable);
  732. }
  733. }
  734. return 0;
  735. #ifndef TOLUA_RELEASE
  736. tolua_lerror:
  737. tolua_error(tolua_S,"#ferror in function 'SetAutoReloadResources'.",&tolua_err);
  738. return 0;
  739. #endif
  740. }
  741. #endif //#ifndef TOLUA_DISABLE
  742. /* method: Exists of class ResourceCache */
  743. #ifndef TOLUA_DISABLE_tolua_Resource_ResourceCache_Exists00
  744. static int tolua_Resource_ResourceCache_Exists00(lua_State* tolua_S)
  745. {
  746. #ifndef TOLUA_RELEASE
  747. tolua_Error tolua_err;
  748. if (
  749. !tolua_isusertype(tolua_S,1,"const ResourceCache",0,&tolua_err) ||
  750. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
  751. !tolua_isnoobj(tolua_S,3,&tolua_err)
  752. )
  753. goto tolua_lerror;
  754. else
  755. #endif
  756. {
  757. const ResourceCache* self = (const ResourceCache*) tolua_tousertype(tolua_S,1,0);
  758. const String* name = ((const String*) tolua_tousertype(tolua_S,2,0));
  759. #ifndef TOLUA_RELEASE
  760. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Exists'", NULL);
  761. #endif
  762. {
  763. bool tolua_ret = (bool) self->Exists(*name);
  764. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  765. }
  766. }
  767. return 1;
  768. #ifndef TOLUA_RELEASE
  769. tolua_lerror:
  770. tolua_error(tolua_S,"#ferror in function 'Exists'.",&tolua_err);
  771. return 0;
  772. #endif
  773. }
  774. #endif //#ifndef TOLUA_DISABLE
  775. /* method: Exists of class ResourceCache */
  776. #ifndef TOLUA_DISABLE_tolua_Resource_ResourceCache_Exists01
  777. static int tolua_Resource_ResourceCache_Exists01(lua_State* tolua_S)
  778. {
  779. tolua_Error tolua_err;
  780. if (
  781. !tolua_isusertype(tolua_S,1,"const ResourceCache",0,&tolua_err) ||
  782. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"StringHash",0,&tolua_err)) ||
  783. !tolua_isnoobj(tolua_S,3,&tolua_err)
  784. )
  785. goto tolua_lerror;
  786. else
  787. {
  788. const ResourceCache* self = (const ResourceCache*) tolua_tousertype(tolua_S,1,0);
  789. StringHash nameHash = *((StringHash*) tolua_tousertype(tolua_S,2,0));
  790. #ifndef TOLUA_RELEASE
  791. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Exists'", NULL);
  792. #endif
  793. {
  794. bool tolua_ret = (bool) self->Exists(nameHash);
  795. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  796. }
  797. }
  798. return 1;
  799. tolua_lerror:
  800. return tolua_Resource_ResourceCache_Exists00(tolua_S);
  801. }
  802. #endif //#ifndef TOLUA_DISABLE
  803. /* method: GetMemoryBudget of class ResourceCache */
  804. #ifndef TOLUA_DISABLE_tolua_Resource_ResourceCache_GetMemoryBudget00
  805. static int tolua_Resource_ResourceCache_GetMemoryBudget00(lua_State* tolua_S)
  806. {
  807. #ifndef TOLUA_RELEASE
  808. tolua_Error tolua_err;
  809. if (
  810. !tolua_isusertype(tolua_S,1,"const ResourceCache",0,&tolua_err) ||
  811. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"ShortStringHash",0,&tolua_err)) ||
  812. !tolua_isnoobj(tolua_S,3,&tolua_err)
  813. )
  814. goto tolua_lerror;
  815. else
  816. #endif
  817. {
  818. const ResourceCache* self = (const ResourceCache*) tolua_tousertype(tolua_S,1,0);
  819. ShortStringHash type = *((ShortStringHash*) tolua_tousertype(tolua_S,2,0));
  820. #ifndef TOLUA_RELEASE
  821. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetMemoryBudget'", NULL);
  822. #endif
  823. {
  824. unsigned tolua_ret = (unsigned) self->GetMemoryBudget(type);
  825. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  826. }
  827. }
  828. return 1;
  829. #ifndef TOLUA_RELEASE
  830. tolua_lerror:
  831. tolua_error(tolua_S,"#ferror in function 'GetMemoryBudget'.",&tolua_err);
  832. return 0;
  833. #endif
  834. }
  835. #endif //#ifndef TOLUA_DISABLE
  836. /* method: GetMemoryUse of class ResourceCache */
  837. #ifndef TOLUA_DISABLE_tolua_Resource_ResourceCache_GetMemoryUse00
  838. static int tolua_Resource_ResourceCache_GetMemoryUse00(lua_State* tolua_S)
  839. {
  840. #ifndef TOLUA_RELEASE
  841. tolua_Error tolua_err;
  842. if (
  843. !tolua_isusertype(tolua_S,1,"const ResourceCache",0,&tolua_err) ||
  844. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"ShortStringHash",0,&tolua_err)) ||
  845. !tolua_isnoobj(tolua_S,3,&tolua_err)
  846. )
  847. goto tolua_lerror;
  848. else
  849. #endif
  850. {
  851. const ResourceCache* self = (const ResourceCache*) tolua_tousertype(tolua_S,1,0);
  852. ShortStringHash type = *((ShortStringHash*) tolua_tousertype(tolua_S,2,0));
  853. #ifndef TOLUA_RELEASE
  854. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetMemoryUse'", NULL);
  855. #endif
  856. {
  857. unsigned tolua_ret = (unsigned) self->GetMemoryUse(type);
  858. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  859. }
  860. }
  861. return 1;
  862. #ifndef TOLUA_RELEASE
  863. tolua_lerror:
  864. tolua_error(tolua_S,"#ferror in function 'GetMemoryUse'.",&tolua_err);
  865. return 0;
  866. #endif
  867. }
  868. #endif //#ifndef TOLUA_DISABLE
  869. /* method: GetTotalMemoryUse of class ResourceCache */
  870. #ifndef TOLUA_DISABLE_tolua_Resource_ResourceCache_GetTotalMemoryUse00
  871. static int tolua_Resource_ResourceCache_GetTotalMemoryUse00(lua_State* tolua_S)
  872. {
  873. #ifndef TOLUA_RELEASE
  874. tolua_Error tolua_err;
  875. if (
  876. !tolua_isusertype(tolua_S,1,"const ResourceCache",0,&tolua_err) ||
  877. !tolua_isnoobj(tolua_S,2,&tolua_err)
  878. )
  879. goto tolua_lerror;
  880. else
  881. #endif
  882. {
  883. const ResourceCache* self = (const ResourceCache*) tolua_tousertype(tolua_S,1,0);
  884. #ifndef TOLUA_RELEASE
  885. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetTotalMemoryUse'", NULL);
  886. #endif
  887. {
  888. unsigned tolua_ret = (unsigned) self->GetTotalMemoryUse();
  889. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  890. }
  891. }
  892. return 1;
  893. #ifndef TOLUA_RELEASE
  894. tolua_lerror:
  895. tolua_error(tolua_S,"#ferror in function 'GetTotalMemoryUse'.",&tolua_err);
  896. return 0;
  897. #endif
  898. }
  899. #endif //#ifndef TOLUA_DISABLE
  900. /* method: GetResourceName of class ResourceCache */
  901. #ifndef TOLUA_DISABLE_tolua_Resource_ResourceCache_GetResourceName00
  902. static int tolua_Resource_ResourceCache_GetResourceName00(lua_State* tolua_S)
  903. {
  904. #ifndef TOLUA_RELEASE
  905. tolua_Error tolua_err;
  906. if (
  907. !tolua_isusertype(tolua_S,1,"const ResourceCache",0,&tolua_err) ||
  908. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"StringHash",0,&tolua_err)) ||
  909. !tolua_isnoobj(tolua_S,3,&tolua_err)
  910. )
  911. goto tolua_lerror;
  912. else
  913. #endif
  914. {
  915. const ResourceCache* self = (const ResourceCache*) tolua_tousertype(tolua_S,1,0);
  916. StringHash nameHash = *((StringHash*) tolua_tousertype(tolua_S,2,0));
  917. #ifndef TOLUA_RELEASE
  918. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetResourceName'", NULL);
  919. #endif
  920. {
  921. const String& tolua_ret = (const String&) self->GetResourceName(nameHash);
  922. tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const String");
  923. }
  924. }
  925. return 1;
  926. #ifndef TOLUA_RELEASE
  927. tolua_lerror:
  928. tolua_error(tolua_S,"#ferror in function 'GetResourceName'.",&tolua_err);
  929. return 0;
  930. #endif
  931. }
  932. #endif //#ifndef TOLUA_DISABLE
  933. /* method: GetResourceFileName of class ResourceCache */
  934. #ifndef TOLUA_DISABLE_tolua_Resource_ResourceCache_GetResourceFileName00
  935. static int tolua_Resource_ResourceCache_GetResourceFileName00(lua_State* tolua_S)
  936. {
  937. #ifndef TOLUA_RELEASE
  938. tolua_Error tolua_err;
  939. if (
  940. !tolua_isusertype(tolua_S,1,"const ResourceCache",0,&tolua_err) ||
  941. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
  942. !tolua_isnoobj(tolua_S,3,&tolua_err)
  943. )
  944. goto tolua_lerror;
  945. else
  946. #endif
  947. {
  948. const ResourceCache* self = (const ResourceCache*) tolua_tousertype(tolua_S,1,0);
  949. const String* name = ((const String*) tolua_tousertype(tolua_S,2,0));
  950. #ifndef TOLUA_RELEASE
  951. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetResourceFileName'", NULL);
  952. #endif
  953. {
  954. String tolua_ret = (String) self->GetResourceFileName(*name);
  955. {
  956. #ifdef __cplusplus
  957. void* tolua_obj = Mtolua_new((String)(tolua_ret));
  958. tolua_pushusertype(tolua_S,tolua_obj,"String");
  959. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  960. #else
  961. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(String));
  962. tolua_pushusertype(tolua_S,tolua_obj,"String");
  963. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  964. #endif
  965. }
  966. }
  967. }
  968. return 1;
  969. #ifndef TOLUA_RELEASE
  970. tolua_lerror:
  971. tolua_error(tolua_S,"#ferror in function 'GetResourceFileName'.",&tolua_err);
  972. return 0;
  973. #endif
  974. }
  975. #endif //#ifndef TOLUA_DISABLE
  976. /* method: GetAutoReloadResources of class ResourceCache */
  977. #ifndef TOLUA_DISABLE_tolua_Resource_ResourceCache_GetAutoReloadResources00
  978. static int tolua_Resource_ResourceCache_GetAutoReloadResources00(lua_State* tolua_S)
  979. {
  980. #ifndef TOLUA_RELEASE
  981. tolua_Error tolua_err;
  982. if (
  983. !tolua_isusertype(tolua_S,1,"const ResourceCache",0,&tolua_err) ||
  984. !tolua_isnoobj(tolua_S,2,&tolua_err)
  985. )
  986. goto tolua_lerror;
  987. else
  988. #endif
  989. {
  990. const ResourceCache* self = (const ResourceCache*) tolua_tousertype(tolua_S,1,0);
  991. #ifndef TOLUA_RELEASE
  992. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetAutoReloadResources'", NULL);
  993. #endif
  994. {
  995. bool tolua_ret = (bool) self->GetAutoReloadResources();
  996. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  997. }
  998. }
  999. return 1;
  1000. #ifndef TOLUA_RELEASE
  1001. tolua_lerror:
  1002. tolua_error(tolua_S,"#ferror in function 'GetAutoReloadResources'.",&tolua_err);
  1003. return 0;
  1004. #endif
  1005. }
  1006. #endif //#ifndef TOLUA_DISABLE
  1007. /* method: ResourceCacheGetAnimation of class ResourceCache */
  1008. #ifndef TOLUA_DISABLE_tolua_Resource_ResourceCache_GetAnimation00
  1009. static int tolua_Resource_ResourceCache_GetAnimation00(lua_State* tolua_S)
  1010. {
  1011. #ifndef TOLUA_RELEASE
  1012. tolua_Error tolua_err;
  1013. if (
  1014. !tolua_isusertype(tolua_S,1,"ResourceCache",0,&tolua_err) ||
  1015. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  1016. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1017. )
  1018. goto tolua_lerror;
  1019. else
  1020. #endif
  1021. {
  1022. ResourceCache* self = (ResourceCache*) tolua_tousertype(tolua_S,1,0);
  1023. const char* fileName = ((const char*) tolua_tostring(tolua_S,2,0));
  1024. #ifndef TOLUA_RELEASE
  1025. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ResourceCacheGetAnimation'", NULL);
  1026. #endif
  1027. {
  1028. tolua_outside Animation* tolua_ret = (tolua_outside Animation*) ResourceCacheGetAnimation(self,fileName);
  1029. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Animation");
  1030. }
  1031. }
  1032. return 1;
  1033. #ifndef TOLUA_RELEASE
  1034. tolua_lerror:
  1035. tolua_error(tolua_S,"#ferror in function 'GetAnimation'.",&tolua_err);
  1036. return 0;
  1037. #endif
  1038. }
  1039. #endif //#ifndef TOLUA_DISABLE
  1040. /* method: ResourceCacheGetFont of class ResourceCache */
  1041. #ifndef TOLUA_DISABLE_tolua_Resource_ResourceCache_GetFont00
  1042. static int tolua_Resource_ResourceCache_GetFont00(lua_State* tolua_S)
  1043. {
  1044. #ifndef TOLUA_RELEASE
  1045. tolua_Error tolua_err;
  1046. if (
  1047. !tolua_isusertype(tolua_S,1,"ResourceCache",0,&tolua_err) ||
  1048. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  1049. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1050. )
  1051. goto tolua_lerror;
  1052. else
  1053. #endif
  1054. {
  1055. ResourceCache* self = (ResourceCache*) tolua_tousertype(tolua_S,1,0);
  1056. const char* fileName = ((const char*) tolua_tostring(tolua_S,2,0));
  1057. #ifndef TOLUA_RELEASE
  1058. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ResourceCacheGetFont'", NULL);
  1059. #endif
  1060. {
  1061. tolua_outside Font* tolua_ret = (tolua_outside Font*) ResourceCacheGetFont(self,fileName);
  1062. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Font");
  1063. }
  1064. }
  1065. return 1;
  1066. #ifndef TOLUA_RELEASE
  1067. tolua_lerror:
  1068. tolua_error(tolua_S,"#ferror in function 'GetFont'.",&tolua_err);
  1069. return 0;
  1070. #endif
  1071. }
  1072. #endif //#ifndef TOLUA_DISABLE
  1073. /* method: ResourceCacheGetImage of class ResourceCache */
  1074. #ifndef TOLUA_DISABLE_tolua_Resource_ResourceCache_GetImage00
  1075. static int tolua_Resource_ResourceCache_GetImage00(lua_State* tolua_S)
  1076. {
  1077. #ifndef TOLUA_RELEASE
  1078. tolua_Error tolua_err;
  1079. if (
  1080. !tolua_isusertype(tolua_S,1,"ResourceCache",0,&tolua_err) ||
  1081. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  1082. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1083. )
  1084. goto tolua_lerror;
  1085. else
  1086. #endif
  1087. {
  1088. ResourceCache* self = (ResourceCache*) tolua_tousertype(tolua_S,1,0);
  1089. const char* fileName = ((const char*) tolua_tostring(tolua_S,2,0));
  1090. #ifndef TOLUA_RELEASE
  1091. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ResourceCacheGetImage'", NULL);
  1092. #endif
  1093. {
  1094. tolua_outside Image* tolua_ret = (tolua_outside Image*) ResourceCacheGetImage(self,fileName);
  1095. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Image");
  1096. }
  1097. }
  1098. return 1;
  1099. #ifndef TOLUA_RELEASE
  1100. tolua_lerror:
  1101. tolua_error(tolua_S,"#ferror in function 'GetImage'.",&tolua_err);
  1102. return 0;
  1103. #endif
  1104. }
  1105. #endif //#ifndef TOLUA_DISABLE
  1106. /* method: ResourceCacheGetMaterial of class ResourceCache */
  1107. #ifndef TOLUA_DISABLE_tolua_Resource_ResourceCache_GetMaterial00
  1108. static int tolua_Resource_ResourceCache_GetMaterial00(lua_State* tolua_S)
  1109. {
  1110. #ifndef TOLUA_RELEASE
  1111. tolua_Error tolua_err;
  1112. if (
  1113. !tolua_isusertype(tolua_S,1,"ResourceCache",0,&tolua_err) ||
  1114. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  1115. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1116. )
  1117. goto tolua_lerror;
  1118. else
  1119. #endif
  1120. {
  1121. ResourceCache* self = (ResourceCache*) tolua_tousertype(tolua_S,1,0);
  1122. const char* fileName = ((const char*) tolua_tostring(tolua_S,2,0));
  1123. #ifndef TOLUA_RELEASE
  1124. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ResourceCacheGetMaterial'", NULL);
  1125. #endif
  1126. {
  1127. tolua_outside Material* tolua_ret = (tolua_outside Material*) ResourceCacheGetMaterial(self,fileName);
  1128. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Material");
  1129. }
  1130. }
  1131. return 1;
  1132. #ifndef TOLUA_RELEASE
  1133. tolua_lerror:
  1134. tolua_error(tolua_S,"#ferror in function 'GetMaterial'.",&tolua_err);
  1135. return 0;
  1136. #endif
  1137. }
  1138. #endif //#ifndef TOLUA_DISABLE
  1139. /* method: ResourceCacheGetModel of class ResourceCache */
  1140. #ifndef TOLUA_DISABLE_tolua_Resource_ResourceCache_GetModel00
  1141. static int tolua_Resource_ResourceCache_GetModel00(lua_State* tolua_S)
  1142. {
  1143. #ifndef TOLUA_RELEASE
  1144. tolua_Error tolua_err;
  1145. if (
  1146. !tolua_isusertype(tolua_S,1,"ResourceCache",0,&tolua_err) ||
  1147. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  1148. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1149. )
  1150. goto tolua_lerror;
  1151. else
  1152. #endif
  1153. {
  1154. ResourceCache* self = (ResourceCache*) tolua_tousertype(tolua_S,1,0);
  1155. const char* fileName = ((const char*) tolua_tostring(tolua_S,2,0));
  1156. #ifndef TOLUA_RELEASE
  1157. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ResourceCacheGetModel'", NULL);
  1158. #endif
  1159. {
  1160. tolua_outside Model* tolua_ret = (tolua_outside Model*) ResourceCacheGetModel(self,fileName);
  1161. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Model");
  1162. }
  1163. }
  1164. return 1;
  1165. #ifndef TOLUA_RELEASE
  1166. tolua_lerror:
  1167. tolua_error(tolua_S,"#ferror in function 'GetModel'.",&tolua_err);
  1168. return 0;
  1169. #endif
  1170. }
  1171. #endif //#ifndef TOLUA_DISABLE
  1172. /* method: ResourceCacheGetSound of class ResourceCache */
  1173. #ifndef TOLUA_DISABLE_tolua_Resource_ResourceCache_GetSound00
  1174. static int tolua_Resource_ResourceCache_GetSound00(lua_State* tolua_S)
  1175. {
  1176. #ifndef TOLUA_RELEASE
  1177. tolua_Error tolua_err;
  1178. if (
  1179. !tolua_isusertype(tolua_S,1,"ResourceCache",0,&tolua_err) ||
  1180. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  1181. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1182. )
  1183. goto tolua_lerror;
  1184. else
  1185. #endif
  1186. {
  1187. ResourceCache* self = (ResourceCache*) tolua_tousertype(tolua_S,1,0);
  1188. const char* fileName = ((const char*) tolua_tostring(tolua_S,2,0));
  1189. #ifndef TOLUA_RELEASE
  1190. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ResourceCacheGetSound'", NULL);
  1191. #endif
  1192. {
  1193. tolua_outside Sound* tolua_ret = (tolua_outside Sound*) ResourceCacheGetSound(self,fileName);
  1194. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sound");
  1195. }
  1196. }
  1197. return 1;
  1198. #ifndef TOLUA_RELEASE
  1199. tolua_lerror:
  1200. tolua_error(tolua_S,"#ferror in function 'GetSound'.",&tolua_err);
  1201. return 0;
  1202. #endif
  1203. }
  1204. #endif //#ifndef TOLUA_DISABLE
  1205. /* method: ResourceCacheGetTechnique of class ResourceCache */
  1206. #ifndef TOLUA_DISABLE_tolua_Resource_ResourceCache_GetTechnique00
  1207. static int tolua_Resource_ResourceCache_GetTechnique00(lua_State* tolua_S)
  1208. {
  1209. #ifndef TOLUA_RELEASE
  1210. tolua_Error tolua_err;
  1211. if (
  1212. !tolua_isusertype(tolua_S,1,"ResourceCache",0,&tolua_err) ||
  1213. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  1214. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1215. )
  1216. goto tolua_lerror;
  1217. else
  1218. #endif
  1219. {
  1220. ResourceCache* self = (ResourceCache*) tolua_tousertype(tolua_S,1,0);
  1221. const char* fileName = ((const char*) tolua_tostring(tolua_S,2,0));
  1222. #ifndef TOLUA_RELEASE
  1223. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ResourceCacheGetTechnique'", NULL);
  1224. #endif
  1225. {
  1226. tolua_outside Technique* tolua_ret = (tolua_outside Technique*) ResourceCacheGetTechnique(self,fileName);
  1227. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Technique");
  1228. }
  1229. }
  1230. return 1;
  1231. #ifndef TOLUA_RELEASE
  1232. tolua_lerror:
  1233. tolua_error(tolua_S,"#ferror in function 'GetTechnique'.",&tolua_err);
  1234. return 0;
  1235. #endif
  1236. }
  1237. #endif //#ifndef TOLUA_DISABLE
  1238. /* method: ResourceCacheGetTexture2D of class ResourceCache */
  1239. #ifndef TOLUA_DISABLE_tolua_Resource_ResourceCache_GetTexture2D00
  1240. static int tolua_Resource_ResourceCache_GetTexture2D00(lua_State* tolua_S)
  1241. {
  1242. #ifndef TOLUA_RELEASE
  1243. tolua_Error tolua_err;
  1244. if (
  1245. !tolua_isusertype(tolua_S,1,"ResourceCache",0,&tolua_err) ||
  1246. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  1247. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1248. )
  1249. goto tolua_lerror;
  1250. else
  1251. #endif
  1252. {
  1253. ResourceCache* self = (ResourceCache*) tolua_tousertype(tolua_S,1,0);
  1254. const char* fileName = ((const char*) tolua_tostring(tolua_S,2,0));
  1255. #ifndef TOLUA_RELEASE
  1256. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ResourceCacheGetTexture2D'", NULL);
  1257. #endif
  1258. {
  1259. tolua_outside Texture2D* tolua_ret = (tolua_outside Texture2D*) ResourceCacheGetTexture2D(self,fileName);
  1260. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Texture2D");
  1261. }
  1262. }
  1263. return 1;
  1264. #ifndef TOLUA_RELEASE
  1265. tolua_lerror:
  1266. tolua_error(tolua_S,"#ferror in function 'GetTexture2D'.",&tolua_err);
  1267. return 0;
  1268. #endif
  1269. }
  1270. #endif //#ifndef TOLUA_DISABLE
  1271. /* method: ResourceCacheGetTextureCube of class ResourceCache */
  1272. #ifndef TOLUA_DISABLE_tolua_Resource_ResourceCache_GetTextureCube00
  1273. static int tolua_Resource_ResourceCache_GetTextureCube00(lua_State* tolua_S)
  1274. {
  1275. #ifndef TOLUA_RELEASE
  1276. tolua_Error tolua_err;
  1277. if (
  1278. !tolua_isusertype(tolua_S,1,"ResourceCache",0,&tolua_err) ||
  1279. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  1280. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1281. )
  1282. goto tolua_lerror;
  1283. else
  1284. #endif
  1285. {
  1286. ResourceCache* self = (ResourceCache*) tolua_tousertype(tolua_S,1,0);
  1287. const char* fileName = ((const char*) tolua_tostring(tolua_S,2,0));
  1288. #ifndef TOLUA_RELEASE
  1289. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ResourceCacheGetTextureCube'", NULL);
  1290. #endif
  1291. {
  1292. tolua_outside TextureCube* tolua_ret = (tolua_outside TextureCube*) ResourceCacheGetTextureCube(self,fileName);
  1293. tolua_pushusertype(tolua_S,(void*)tolua_ret,"TextureCube");
  1294. }
  1295. }
  1296. return 1;
  1297. #ifndef TOLUA_RELEASE
  1298. tolua_lerror:
  1299. tolua_error(tolua_S,"#ferror in function 'GetTextureCube'.",&tolua_err);
  1300. return 0;
  1301. #endif
  1302. }
  1303. #endif //#ifndef TOLUA_DISABLE
  1304. /* method: ResourceCacheGetXMLFile of class ResourceCache */
  1305. #ifndef TOLUA_DISABLE_tolua_Resource_ResourceCache_GetXMLFile00
  1306. static int tolua_Resource_ResourceCache_GetXMLFile00(lua_State* tolua_S)
  1307. {
  1308. #ifndef TOLUA_RELEASE
  1309. tolua_Error tolua_err;
  1310. if (
  1311. !tolua_isusertype(tolua_S,1,"ResourceCache",0,&tolua_err) ||
  1312. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  1313. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1314. )
  1315. goto tolua_lerror;
  1316. else
  1317. #endif
  1318. {
  1319. ResourceCache* self = (ResourceCache*) tolua_tousertype(tolua_S,1,0);
  1320. const char* fileName = ((const char*) tolua_tostring(tolua_S,2,0));
  1321. #ifndef TOLUA_RELEASE
  1322. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ResourceCacheGetXMLFile'", NULL);
  1323. #endif
  1324. {
  1325. tolua_outside XMLFile* tolua_ret = (tolua_outside XMLFile*) ResourceCacheGetXMLFile(self,fileName);
  1326. tolua_pushusertype(tolua_S,(void*)tolua_ret,"XMLFile");
  1327. }
  1328. }
  1329. return 1;
  1330. #ifndef TOLUA_RELEASE
  1331. tolua_lerror:
  1332. tolua_error(tolua_S,"#ferror in function 'GetXMLFile'.",&tolua_err);
  1333. return 0;
  1334. #endif
  1335. }
  1336. #endif //#ifndef TOLUA_DISABLE
  1337. /* function: GetCache */
  1338. #ifndef TOLUA_DISABLE_tolua_Resource_GetCache00
  1339. static int tolua_Resource_GetCache00(lua_State* tolua_S)
  1340. {
  1341. #ifndef TOLUA_RELEASE
  1342. tolua_Error tolua_err;
  1343. if (
  1344. !tolua_isnoobj(tolua_S,1,&tolua_err)
  1345. )
  1346. goto tolua_lerror;
  1347. else
  1348. #endif
  1349. {
  1350. {
  1351. ResourceCache* tolua_ret = (ResourceCache*) GetCache();
  1352. tolua_pushusertype(tolua_S,(void*)tolua_ret,"ResourceCache");
  1353. }
  1354. }
  1355. return 1;
  1356. #ifndef TOLUA_RELEASE
  1357. tolua_lerror:
  1358. tolua_error(tolua_S,"#ferror in function 'GetCache'.",&tolua_err);
  1359. return 0;
  1360. #endif
  1361. }
  1362. #endif //#ifndef TOLUA_DISABLE
  1363. /* method: IsNull of class XMLElement */
  1364. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_IsNull00
  1365. static int tolua_Resource_XMLElement_IsNull00(lua_State* tolua_S)
  1366. {
  1367. #ifndef TOLUA_RELEASE
  1368. tolua_Error tolua_err;
  1369. if (
  1370. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  1371. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1372. )
  1373. goto tolua_lerror;
  1374. else
  1375. #endif
  1376. {
  1377. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  1378. #ifndef TOLUA_RELEASE
  1379. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsNull'", NULL);
  1380. #endif
  1381. {
  1382. bool tolua_ret = (bool) self->IsNull();
  1383. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  1384. }
  1385. }
  1386. return 1;
  1387. #ifndef TOLUA_RELEASE
  1388. tolua_lerror:
  1389. tolua_error(tolua_S,"#ferror in function 'IsNull'.",&tolua_err);
  1390. return 0;
  1391. #endif
  1392. }
  1393. #endif //#ifndef TOLUA_DISABLE
  1394. /* method: NotNull of class XMLElement */
  1395. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_NotNull00
  1396. static int tolua_Resource_XMLElement_NotNull00(lua_State* tolua_S)
  1397. {
  1398. #ifndef TOLUA_RELEASE
  1399. tolua_Error tolua_err;
  1400. if (
  1401. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  1402. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1403. )
  1404. goto tolua_lerror;
  1405. else
  1406. #endif
  1407. {
  1408. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  1409. #ifndef TOLUA_RELEASE
  1410. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'NotNull'", NULL);
  1411. #endif
  1412. {
  1413. bool tolua_ret = (bool) self->NotNull();
  1414. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  1415. }
  1416. }
  1417. return 1;
  1418. #ifndef TOLUA_RELEASE
  1419. tolua_lerror:
  1420. tolua_error(tolua_S,"#ferror in function 'NotNull'.",&tolua_err);
  1421. return 0;
  1422. #endif
  1423. }
  1424. #endif //#ifndef TOLUA_DISABLE
  1425. /* method: operatorbool of class XMLElement */
  1426. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement__bool00
  1427. static int tolua_Resource_XMLElement__bool00(lua_State* tolua_S)
  1428. {
  1429. #ifndef TOLUA_RELEASE
  1430. tolua_Error tolua_err;
  1431. if (
  1432. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  1433. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1434. )
  1435. goto tolua_lerror;
  1436. else
  1437. #endif
  1438. {
  1439. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  1440. #ifndef TOLUA_RELEASE
  1441. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operatorbool'", NULL);
  1442. #endif
  1443. {
  1444. bool tolua_ret = (bool) self->operator bool();
  1445. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  1446. }
  1447. }
  1448. return 1;
  1449. #ifndef TOLUA_RELEASE
  1450. tolua_lerror:
  1451. tolua_error(tolua_S,"#ferror in function '.bool'.",&tolua_err);
  1452. return 0;
  1453. #endif
  1454. }
  1455. #endif //#ifndef TOLUA_DISABLE
  1456. /* method: GetName of class XMLElement */
  1457. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_GetName00
  1458. static int tolua_Resource_XMLElement_GetName00(lua_State* tolua_S)
  1459. {
  1460. #ifndef TOLUA_RELEASE
  1461. tolua_Error tolua_err;
  1462. if (
  1463. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  1464. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1465. )
  1466. goto tolua_lerror;
  1467. else
  1468. #endif
  1469. {
  1470. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  1471. #ifndef TOLUA_RELEASE
  1472. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetName'", NULL);
  1473. #endif
  1474. {
  1475. String tolua_ret = (String) self->GetName();
  1476. {
  1477. #ifdef __cplusplus
  1478. void* tolua_obj = Mtolua_new((String)(tolua_ret));
  1479. tolua_pushusertype(tolua_S,tolua_obj,"String");
  1480. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1481. #else
  1482. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(String));
  1483. tolua_pushusertype(tolua_S,tolua_obj,"String");
  1484. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1485. #endif
  1486. }
  1487. }
  1488. }
  1489. return 1;
  1490. #ifndef TOLUA_RELEASE
  1491. tolua_lerror:
  1492. tolua_error(tolua_S,"#ferror in function 'GetName'.",&tolua_err);
  1493. return 0;
  1494. #endif
  1495. }
  1496. #endif //#ifndef TOLUA_DISABLE
  1497. /* method: HasChild of class XMLElement */
  1498. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_HasChild00
  1499. static int tolua_Resource_XMLElement_HasChild00(lua_State* tolua_S)
  1500. {
  1501. #ifndef TOLUA_RELEASE
  1502. tolua_Error tolua_err;
  1503. if (
  1504. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  1505. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  1506. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1507. )
  1508. goto tolua_lerror;
  1509. else
  1510. #endif
  1511. {
  1512. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  1513. const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
  1514. #ifndef TOLUA_RELEASE
  1515. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HasChild'", NULL);
  1516. #endif
  1517. {
  1518. bool tolua_ret = (bool) self->HasChild(name);
  1519. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  1520. }
  1521. }
  1522. return 1;
  1523. #ifndef TOLUA_RELEASE
  1524. tolua_lerror:
  1525. tolua_error(tolua_S,"#ferror in function 'HasChild'.",&tolua_err);
  1526. return 0;
  1527. #endif
  1528. }
  1529. #endif //#ifndef TOLUA_DISABLE
  1530. /* method: HasChild of class XMLElement */
  1531. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_HasChild01
  1532. static int tolua_Resource_XMLElement_HasChild01(lua_State* tolua_S)
  1533. {
  1534. tolua_Error tolua_err;
  1535. if (
  1536. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  1537. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  1538. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1539. )
  1540. goto tolua_lerror;
  1541. else
  1542. {
  1543. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  1544. const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
  1545. #ifndef TOLUA_RELEASE
  1546. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HasChild'", NULL);
  1547. #endif
  1548. {
  1549. bool tolua_ret = (bool) self->HasChild(name);
  1550. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  1551. }
  1552. }
  1553. return 1;
  1554. tolua_lerror:
  1555. return tolua_Resource_XMLElement_HasChild00(tolua_S);
  1556. }
  1557. #endif //#ifndef TOLUA_DISABLE
  1558. /* method: GetChild of class XMLElement */
  1559. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_GetChild00
  1560. static int tolua_Resource_XMLElement_GetChild00(lua_State* tolua_S)
  1561. {
  1562. #ifndef TOLUA_RELEASE
  1563. tolua_Error tolua_err;
  1564. if (
  1565. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  1566. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  1567. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1568. )
  1569. goto tolua_lerror;
  1570. else
  1571. #endif
  1572. {
  1573. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  1574. const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
  1575. #ifndef TOLUA_RELEASE
  1576. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetChild'", NULL);
  1577. #endif
  1578. {
  1579. XMLElement tolua_ret = (XMLElement) self->GetChild(name);
  1580. {
  1581. #ifdef __cplusplus
  1582. void* tolua_obj = Mtolua_new((XMLElement)(tolua_ret));
  1583. tolua_pushusertype(tolua_S,tolua_obj,"XMLElement");
  1584. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1585. #else
  1586. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(XMLElement));
  1587. tolua_pushusertype(tolua_S,tolua_obj,"XMLElement");
  1588. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1589. #endif
  1590. }
  1591. }
  1592. }
  1593. return 1;
  1594. #ifndef TOLUA_RELEASE
  1595. tolua_lerror:
  1596. tolua_error(tolua_S,"#ferror in function 'GetChild'.",&tolua_err);
  1597. return 0;
  1598. #endif
  1599. }
  1600. #endif //#ifndef TOLUA_DISABLE
  1601. /* method: GetChild of class XMLElement */
  1602. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_GetChild01
  1603. static int tolua_Resource_XMLElement_GetChild01(lua_State* tolua_S)
  1604. {
  1605. tolua_Error tolua_err;
  1606. if (
  1607. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  1608. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  1609. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1610. )
  1611. goto tolua_lerror;
  1612. else
  1613. {
  1614. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  1615. const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
  1616. #ifndef TOLUA_RELEASE
  1617. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetChild'", NULL);
  1618. #endif
  1619. {
  1620. XMLElement tolua_ret = (XMLElement) self->GetChild(name);
  1621. {
  1622. #ifdef __cplusplus
  1623. void* tolua_obj = Mtolua_new((XMLElement)(tolua_ret));
  1624. tolua_pushusertype(tolua_S,tolua_obj,"XMLElement");
  1625. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1626. #else
  1627. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(XMLElement));
  1628. tolua_pushusertype(tolua_S,tolua_obj,"XMLElement");
  1629. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1630. #endif
  1631. }
  1632. }
  1633. }
  1634. return 1;
  1635. tolua_lerror:
  1636. return tolua_Resource_XMLElement_GetChild00(tolua_S);
  1637. }
  1638. #endif //#ifndef TOLUA_DISABLE
  1639. /* method: GetNext of class XMLElement */
  1640. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_GetNext00
  1641. static int tolua_Resource_XMLElement_GetNext00(lua_State* tolua_S)
  1642. {
  1643. #ifndef TOLUA_RELEASE
  1644. tolua_Error tolua_err;
  1645. if (
  1646. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  1647. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  1648. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1649. )
  1650. goto tolua_lerror;
  1651. else
  1652. #endif
  1653. {
  1654. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  1655. const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
  1656. #ifndef TOLUA_RELEASE
  1657. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetNext'", NULL);
  1658. #endif
  1659. {
  1660. XMLElement tolua_ret = (XMLElement) self->GetNext(name);
  1661. {
  1662. #ifdef __cplusplus
  1663. void* tolua_obj = Mtolua_new((XMLElement)(tolua_ret));
  1664. tolua_pushusertype(tolua_S,tolua_obj,"XMLElement");
  1665. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1666. #else
  1667. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(XMLElement));
  1668. tolua_pushusertype(tolua_S,tolua_obj,"XMLElement");
  1669. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1670. #endif
  1671. }
  1672. }
  1673. }
  1674. return 1;
  1675. #ifndef TOLUA_RELEASE
  1676. tolua_lerror:
  1677. tolua_error(tolua_S,"#ferror in function 'GetNext'.",&tolua_err);
  1678. return 0;
  1679. #endif
  1680. }
  1681. #endif //#ifndef TOLUA_DISABLE
  1682. /* method: GetNext of class XMLElement */
  1683. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_GetNext01
  1684. static int tolua_Resource_XMLElement_GetNext01(lua_State* tolua_S)
  1685. {
  1686. tolua_Error tolua_err;
  1687. if (
  1688. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  1689. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  1690. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1691. )
  1692. goto tolua_lerror;
  1693. else
  1694. {
  1695. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  1696. const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
  1697. #ifndef TOLUA_RELEASE
  1698. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetNext'", NULL);
  1699. #endif
  1700. {
  1701. XMLElement tolua_ret = (XMLElement) self->GetNext(name);
  1702. {
  1703. #ifdef __cplusplus
  1704. void* tolua_obj = Mtolua_new((XMLElement)(tolua_ret));
  1705. tolua_pushusertype(tolua_S,tolua_obj,"XMLElement");
  1706. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1707. #else
  1708. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(XMLElement));
  1709. tolua_pushusertype(tolua_S,tolua_obj,"XMLElement");
  1710. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1711. #endif
  1712. }
  1713. }
  1714. }
  1715. return 1;
  1716. tolua_lerror:
  1717. return tolua_Resource_XMLElement_GetNext00(tolua_S);
  1718. }
  1719. #endif //#ifndef TOLUA_DISABLE
  1720. /* method: GetParent of class XMLElement */
  1721. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_GetParent00
  1722. static int tolua_Resource_XMLElement_GetParent00(lua_State* tolua_S)
  1723. {
  1724. #ifndef TOLUA_RELEASE
  1725. tolua_Error tolua_err;
  1726. if (
  1727. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  1728. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1729. )
  1730. goto tolua_lerror;
  1731. else
  1732. #endif
  1733. {
  1734. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  1735. #ifndef TOLUA_RELEASE
  1736. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetParent'", NULL);
  1737. #endif
  1738. {
  1739. XMLElement tolua_ret = (XMLElement) self->GetParent();
  1740. {
  1741. #ifdef __cplusplus
  1742. void* tolua_obj = Mtolua_new((XMLElement)(tolua_ret));
  1743. tolua_pushusertype(tolua_S,tolua_obj,"XMLElement");
  1744. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1745. #else
  1746. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(XMLElement));
  1747. tolua_pushusertype(tolua_S,tolua_obj,"XMLElement");
  1748. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1749. #endif
  1750. }
  1751. }
  1752. }
  1753. return 1;
  1754. #ifndef TOLUA_RELEASE
  1755. tolua_lerror:
  1756. tolua_error(tolua_S,"#ferror in function 'GetParent'.",&tolua_err);
  1757. return 0;
  1758. #endif
  1759. }
  1760. #endif //#ifndef TOLUA_DISABLE
  1761. /* method: GetNumAttributes of class XMLElement */
  1762. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_GetNumAttributes00
  1763. static int tolua_Resource_XMLElement_GetNumAttributes00(lua_State* tolua_S)
  1764. {
  1765. #ifndef TOLUA_RELEASE
  1766. tolua_Error tolua_err;
  1767. if (
  1768. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  1769. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1770. )
  1771. goto tolua_lerror;
  1772. else
  1773. #endif
  1774. {
  1775. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  1776. #ifndef TOLUA_RELEASE
  1777. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetNumAttributes'", NULL);
  1778. #endif
  1779. {
  1780. unsigned tolua_ret = (unsigned) self->GetNumAttributes();
  1781. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  1782. }
  1783. }
  1784. return 1;
  1785. #ifndef TOLUA_RELEASE
  1786. tolua_lerror:
  1787. tolua_error(tolua_S,"#ferror in function 'GetNumAttributes'.",&tolua_err);
  1788. return 0;
  1789. #endif
  1790. }
  1791. #endif //#ifndef TOLUA_DISABLE
  1792. /* method: HasAttribute of class XMLElement */
  1793. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_HasAttribute00
  1794. static int tolua_Resource_XMLElement_HasAttribute00(lua_State* tolua_S)
  1795. {
  1796. #ifndef TOLUA_RELEASE
  1797. tolua_Error tolua_err;
  1798. if (
  1799. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  1800. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  1801. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1802. )
  1803. goto tolua_lerror;
  1804. else
  1805. #endif
  1806. {
  1807. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  1808. const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
  1809. #ifndef TOLUA_RELEASE
  1810. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HasAttribute'", NULL);
  1811. #endif
  1812. {
  1813. bool tolua_ret = (bool) self->HasAttribute(name);
  1814. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  1815. }
  1816. }
  1817. return 1;
  1818. #ifndef TOLUA_RELEASE
  1819. tolua_lerror:
  1820. tolua_error(tolua_S,"#ferror in function 'HasAttribute'.",&tolua_err);
  1821. return 0;
  1822. #endif
  1823. }
  1824. #endif //#ifndef TOLUA_DISABLE
  1825. /* method: HasAttribute of class XMLElement */
  1826. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_HasAttribute01
  1827. static int tolua_Resource_XMLElement_HasAttribute01(lua_State* tolua_S)
  1828. {
  1829. tolua_Error tolua_err;
  1830. if (
  1831. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  1832. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  1833. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1834. )
  1835. goto tolua_lerror;
  1836. else
  1837. {
  1838. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  1839. const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
  1840. #ifndef TOLUA_RELEASE
  1841. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HasAttribute'", NULL);
  1842. #endif
  1843. {
  1844. bool tolua_ret = (bool) self->HasAttribute(name);
  1845. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  1846. }
  1847. }
  1848. return 1;
  1849. tolua_lerror:
  1850. return tolua_Resource_XMLElement_HasAttribute00(tolua_S);
  1851. }
  1852. #endif //#ifndef TOLUA_DISABLE
  1853. /* method: GetBool of class XMLElement */
  1854. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_GetBool00
  1855. static int tolua_Resource_XMLElement_GetBool00(lua_State* tolua_S)
  1856. {
  1857. #ifndef TOLUA_RELEASE
  1858. tolua_Error tolua_err;
  1859. if (
  1860. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  1861. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  1862. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1863. )
  1864. goto tolua_lerror;
  1865. else
  1866. #endif
  1867. {
  1868. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  1869. const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
  1870. #ifndef TOLUA_RELEASE
  1871. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetBool'", NULL);
  1872. #endif
  1873. {
  1874. bool tolua_ret = (bool) self->GetBool(name);
  1875. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  1876. }
  1877. }
  1878. return 1;
  1879. #ifndef TOLUA_RELEASE
  1880. tolua_lerror:
  1881. tolua_error(tolua_S,"#ferror in function 'GetBool'.",&tolua_err);
  1882. return 0;
  1883. #endif
  1884. }
  1885. #endif //#ifndef TOLUA_DISABLE
  1886. /* method: GetBoundingBox of class XMLElement */
  1887. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_GetBoundingBox00
  1888. static int tolua_Resource_XMLElement_GetBoundingBox00(lua_State* tolua_S)
  1889. {
  1890. #ifndef TOLUA_RELEASE
  1891. tolua_Error tolua_err;
  1892. if (
  1893. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  1894. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1895. )
  1896. goto tolua_lerror;
  1897. else
  1898. #endif
  1899. {
  1900. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  1901. #ifndef TOLUA_RELEASE
  1902. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetBoundingBox'", NULL);
  1903. #endif
  1904. {
  1905. BoundingBox tolua_ret = (BoundingBox) self->GetBoundingBox();
  1906. {
  1907. #ifdef __cplusplus
  1908. void* tolua_obj = Mtolua_new((BoundingBox)(tolua_ret));
  1909. tolua_pushusertype(tolua_S,tolua_obj,"BoundingBox");
  1910. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1911. #else
  1912. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(BoundingBox));
  1913. tolua_pushusertype(tolua_S,tolua_obj,"BoundingBox");
  1914. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1915. #endif
  1916. }
  1917. }
  1918. }
  1919. return 1;
  1920. #ifndef TOLUA_RELEASE
  1921. tolua_lerror:
  1922. tolua_error(tolua_S,"#ferror in function 'GetBoundingBox'.",&tolua_err);
  1923. return 0;
  1924. #endif
  1925. }
  1926. #endif //#ifndef TOLUA_DISABLE
  1927. /* method: GetColor of class XMLElement */
  1928. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_GetColor00
  1929. static int tolua_Resource_XMLElement_GetColor00(lua_State* tolua_S)
  1930. {
  1931. #ifndef TOLUA_RELEASE
  1932. tolua_Error tolua_err;
  1933. if (
  1934. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  1935. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  1936. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1937. )
  1938. goto tolua_lerror;
  1939. else
  1940. #endif
  1941. {
  1942. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  1943. const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
  1944. #ifndef TOLUA_RELEASE
  1945. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetColor'", NULL);
  1946. #endif
  1947. {
  1948. Color tolua_ret = (Color) self->GetColor(name);
  1949. {
  1950. #ifdef __cplusplus
  1951. void* tolua_obj = Mtolua_new((Color)(tolua_ret));
  1952. tolua_pushusertype(tolua_S,tolua_obj,"Color");
  1953. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1954. #else
  1955. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Color));
  1956. tolua_pushusertype(tolua_S,tolua_obj,"Color");
  1957. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1958. #endif
  1959. }
  1960. }
  1961. }
  1962. return 1;
  1963. #ifndef TOLUA_RELEASE
  1964. tolua_lerror:
  1965. tolua_error(tolua_S,"#ferror in function 'GetColor'.",&tolua_err);
  1966. return 0;
  1967. #endif
  1968. }
  1969. #endif //#ifndef TOLUA_DISABLE
  1970. /* method: GetFloat of class XMLElement */
  1971. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_GetFloat00
  1972. static int tolua_Resource_XMLElement_GetFloat00(lua_State* tolua_S)
  1973. {
  1974. #ifndef TOLUA_RELEASE
  1975. tolua_Error tolua_err;
  1976. if (
  1977. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  1978. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  1979. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1980. )
  1981. goto tolua_lerror;
  1982. else
  1983. #endif
  1984. {
  1985. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  1986. const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
  1987. #ifndef TOLUA_RELEASE
  1988. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetFloat'", NULL);
  1989. #endif
  1990. {
  1991. float tolua_ret = (float) self->GetFloat(name);
  1992. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  1993. }
  1994. }
  1995. return 1;
  1996. #ifndef TOLUA_RELEASE
  1997. tolua_lerror:
  1998. tolua_error(tolua_S,"#ferror in function 'GetFloat'.",&tolua_err);
  1999. return 0;
  2000. #endif
  2001. }
  2002. #endif //#ifndef TOLUA_DISABLE
  2003. /* method: GetUInt of class XMLElement */
  2004. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_GetUInt00
  2005. static int tolua_Resource_XMLElement_GetUInt00(lua_State* tolua_S)
  2006. {
  2007. #ifndef TOLUA_RELEASE
  2008. tolua_Error tolua_err;
  2009. if (
  2010. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  2011. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  2012. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2013. )
  2014. goto tolua_lerror;
  2015. else
  2016. #endif
  2017. {
  2018. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  2019. const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
  2020. #ifndef TOLUA_RELEASE
  2021. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetUInt'", NULL);
  2022. #endif
  2023. {
  2024. unsigned tolua_ret = (unsigned) self->GetUInt(name);
  2025. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  2026. }
  2027. }
  2028. return 1;
  2029. #ifndef TOLUA_RELEASE
  2030. tolua_lerror:
  2031. tolua_error(tolua_S,"#ferror in function 'GetUInt'.",&tolua_err);
  2032. return 0;
  2033. #endif
  2034. }
  2035. #endif //#ifndef TOLUA_DISABLE
  2036. /* method: GetInt of class XMLElement */
  2037. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_GetInt00
  2038. static int tolua_Resource_XMLElement_GetInt00(lua_State* tolua_S)
  2039. {
  2040. #ifndef TOLUA_RELEASE
  2041. tolua_Error tolua_err;
  2042. if (
  2043. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  2044. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  2045. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2046. )
  2047. goto tolua_lerror;
  2048. else
  2049. #endif
  2050. {
  2051. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  2052. const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
  2053. #ifndef TOLUA_RELEASE
  2054. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetInt'", NULL);
  2055. #endif
  2056. {
  2057. int tolua_ret = (int) self->GetInt(name);
  2058. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  2059. }
  2060. }
  2061. return 1;
  2062. #ifndef TOLUA_RELEASE
  2063. tolua_lerror:
  2064. tolua_error(tolua_S,"#ferror in function 'GetInt'.",&tolua_err);
  2065. return 0;
  2066. #endif
  2067. }
  2068. #endif //#ifndef TOLUA_DISABLE
  2069. /* method: GetIntRect of class XMLElement */
  2070. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_GetIntRect00
  2071. static int tolua_Resource_XMLElement_GetIntRect00(lua_State* tolua_S)
  2072. {
  2073. #ifndef TOLUA_RELEASE
  2074. tolua_Error tolua_err;
  2075. if (
  2076. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  2077. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  2078. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2079. )
  2080. goto tolua_lerror;
  2081. else
  2082. #endif
  2083. {
  2084. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  2085. const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
  2086. #ifndef TOLUA_RELEASE
  2087. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetIntRect'", NULL);
  2088. #endif
  2089. {
  2090. IntRect tolua_ret = (IntRect) self->GetIntRect(name);
  2091. {
  2092. #ifdef __cplusplus
  2093. void* tolua_obj = Mtolua_new((IntRect)(tolua_ret));
  2094. tolua_pushusertype(tolua_S,tolua_obj,"IntRect");
  2095. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2096. #else
  2097. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(IntRect));
  2098. tolua_pushusertype(tolua_S,tolua_obj,"IntRect");
  2099. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2100. #endif
  2101. }
  2102. }
  2103. }
  2104. return 1;
  2105. #ifndef TOLUA_RELEASE
  2106. tolua_lerror:
  2107. tolua_error(tolua_S,"#ferror in function 'GetIntRect'.",&tolua_err);
  2108. return 0;
  2109. #endif
  2110. }
  2111. #endif //#ifndef TOLUA_DISABLE
  2112. /* method: GetIntVector2 of class XMLElement */
  2113. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_GetIntVector200
  2114. static int tolua_Resource_XMLElement_GetIntVector200(lua_State* tolua_S)
  2115. {
  2116. #ifndef TOLUA_RELEASE
  2117. tolua_Error tolua_err;
  2118. if (
  2119. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  2120. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  2121. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2122. )
  2123. goto tolua_lerror;
  2124. else
  2125. #endif
  2126. {
  2127. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  2128. const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
  2129. #ifndef TOLUA_RELEASE
  2130. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetIntVector2'", NULL);
  2131. #endif
  2132. {
  2133. IntVector2 tolua_ret = (IntVector2) self->GetIntVector2(name);
  2134. {
  2135. #ifdef __cplusplus
  2136. void* tolua_obj = Mtolua_new((IntVector2)(tolua_ret));
  2137. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  2138. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2139. #else
  2140. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(IntVector2));
  2141. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  2142. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2143. #endif
  2144. }
  2145. }
  2146. }
  2147. return 1;
  2148. #ifndef TOLUA_RELEASE
  2149. tolua_lerror:
  2150. tolua_error(tolua_S,"#ferror in function 'GetIntVector2'.",&tolua_err);
  2151. return 0;
  2152. #endif
  2153. }
  2154. #endif //#ifndef TOLUA_DISABLE
  2155. /* method: GetRect of class XMLElement */
  2156. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_GetRect00
  2157. static int tolua_Resource_XMLElement_GetRect00(lua_State* tolua_S)
  2158. {
  2159. #ifndef TOLUA_RELEASE
  2160. tolua_Error tolua_err;
  2161. if (
  2162. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  2163. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  2164. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2165. )
  2166. goto tolua_lerror;
  2167. else
  2168. #endif
  2169. {
  2170. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  2171. const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
  2172. #ifndef TOLUA_RELEASE
  2173. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetRect'", NULL);
  2174. #endif
  2175. {
  2176. Rect tolua_ret = (Rect) self->GetRect(name);
  2177. {
  2178. #ifdef __cplusplus
  2179. void* tolua_obj = Mtolua_new((Rect)(tolua_ret));
  2180. tolua_pushusertype(tolua_S,tolua_obj,"Rect");
  2181. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2182. #else
  2183. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Rect));
  2184. tolua_pushusertype(tolua_S,tolua_obj,"Rect");
  2185. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2186. #endif
  2187. }
  2188. }
  2189. }
  2190. return 1;
  2191. #ifndef TOLUA_RELEASE
  2192. tolua_lerror:
  2193. tolua_error(tolua_S,"#ferror in function 'GetRect'.",&tolua_err);
  2194. return 0;
  2195. #endif
  2196. }
  2197. #endif //#ifndef TOLUA_DISABLE
  2198. /* method: GetQuaternion of class XMLElement */
  2199. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_GetQuaternion00
  2200. static int tolua_Resource_XMLElement_GetQuaternion00(lua_State* tolua_S)
  2201. {
  2202. #ifndef TOLUA_RELEASE
  2203. tolua_Error tolua_err;
  2204. if (
  2205. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  2206. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  2207. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2208. )
  2209. goto tolua_lerror;
  2210. else
  2211. #endif
  2212. {
  2213. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  2214. const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
  2215. #ifndef TOLUA_RELEASE
  2216. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetQuaternion'", NULL);
  2217. #endif
  2218. {
  2219. Quaternion tolua_ret = (Quaternion) self->GetQuaternion(name);
  2220. {
  2221. #ifdef __cplusplus
  2222. void* tolua_obj = Mtolua_new((Quaternion)(tolua_ret));
  2223. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  2224. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2225. #else
  2226. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Quaternion));
  2227. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  2228. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2229. #endif
  2230. }
  2231. }
  2232. }
  2233. return 1;
  2234. #ifndef TOLUA_RELEASE
  2235. tolua_lerror:
  2236. tolua_error(tolua_S,"#ferror in function 'GetQuaternion'.",&tolua_err);
  2237. return 0;
  2238. #endif
  2239. }
  2240. #endif //#ifndef TOLUA_DISABLE
  2241. /* method: GetResourceRef of class XMLElement */
  2242. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_GetResourceRef00
  2243. static int tolua_Resource_XMLElement_GetResourceRef00(lua_State* tolua_S)
  2244. {
  2245. #ifndef TOLUA_RELEASE
  2246. tolua_Error tolua_err;
  2247. if (
  2248. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  2249. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2250. )
  2251. goto tolua_lerror;
  2252. else
  2253. #endif
  2254. {
  2255. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  2256. #ifndef TOLUA_RELEASE
  2257. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetResourceRef'", NULL);
  2258. #endif
  2259. {
  2260. ResourceRef tolua_ret = (ResourceRef) self->GetResourceRef();
  2261. {
  2262. #ifdef __cplusplus
  2263. void* tolua_obj = Mtolua_new((ResourceRef)(tolua_ret));
  2264. tolua_pushusertype(tolua_S,tolua_obj,"ResourceRef");
  2265. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2266. #else
  2267. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(ResourceRef));
  2268. tolua_pushusertype(tolua_S,tolua_obj,"ResourceRef");
  2269. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2270. #endif
  2271. }
  2272. }
  2273. }
  2274. return 1;
  2275. #ifndef TOLUA_RELEASE
  2276. tolua_lerror:
  2277. tolua_error(tolua_S,"#ferror in function 'GetResourceRef'.",&tolua_err);
  2278. return 0;
  2279. #endif
  2280. }
  2281. #endif //#ifndef TOLUA_DISABLE
  2282. /* method: GetResourceRefList of class XMLElement */
  2283. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_GetResourceRefList00
  2284. static int tolua_Resource_XMLElement_GetResourceRefList00(lua_State* tolua_S)
  2285. {
  2286. #ifndef TOLUA_RELEASE
  2287. tolua_Error tolua_err;
  2288. if (
  2289. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  2290. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2291. )
  2292. goto tolua_lerror;
  2293. else
  2294. #endif
  2295. {
  2296. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  2297. #ifndef TOLUA_RELEASE
  2298. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetResourceRefList'", NULL);
  2299. #endif
  2300. {
  2301. ResourceRefList tolua_ret = (ResourceRefList) self->GetResourceRefList();
  2302. {
  2303. #ifdef __cplusplus
  2304. void* tolua_obj = Mtolua_new((ResourceRefList)(tolua_ret));
  2305. tolua_pushusertype(tolua_S,tolua_obj,"ResourceRefList");
  2306. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2307. #else
  2308. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(ResourceRefList));
  2309. tolua_pushusertype(tolua_S,tolua_obj,"ResourceRefList");
  2310. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2311. #endif
  2312. }
  2313. }
  2314. }
  2315. return 1;
  2316. #ifndef TOLUA_RELEASE
  2317. tolua_lerror:
  2318. tolua_error(tolua_S,"#ferror in function 'GetResourceRefList'.",&tolua_err);
  2319. return 0;
  2320. #endif
  2321. }
  2322. #endif //#ifndef TOLUA_DISABLE
  2323. /* method: GetVector2 of class XMLElement */
  2324. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_GetVector200
  2325. static int tolua_Resource_XMLElement_GetVector200(lua_State* tolua_S)
  2326. {
  2327. #ifndef TOLUA_RELEASE
  2328. tolua_Error tolua_err;
  2329. if (
  2330. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  2331. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  2332. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2333. )
  2334. goto tolua_lerror;
  2335. else
  2336. #endif
  2337. {
  2338. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  2339. const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
  2340. #ifndef TOLUA_RELEASE
  2341. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetVector2'", NULL);
  2342. #endif
  2343. {
  2344. Vector2 tolua_ret = (Vector2) self->GetVector2(name);
  2345. {
  2346. #ifdef __cplusplus
  2347. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  2348. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  2349. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2350. #else
  2351. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  2352. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  2353. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2354. #endif
  2355. }
  2356. }
  2357. }
  2358. return 1;
  2359. #ifndef TOLUA_RELEASE
  2360. tolua_lerror:
  2361. tolua_error(tolua_S,"#ferror in function 'GetVector2'.",&tolua_err);
  2362. return 0;
  2363. #endif
  2364. }
  2365. #endif //#ifndef TOLUA_DISABLE
  2366. /* method: GetVector3 of class XMLElement */
  2367. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_GetVector300
  2368. static int tolua_Resource_XMLElement_GetVector300(lua_State* tolua_S)
  2369. {
  2370. #ifndef TOLUA_RELEASE
  2371. tolua_Error tolua_err;
  2372. if (
  2373. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  2374. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  2375. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2376. )
  2377. goto tolua_lerror;
  2378. else
  2379. #endif
  2380. {
  2381. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  2382. const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
  2383. #ifndef TOLUA_RELEASE
  2384. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetVector3'", NULL);
  2385. #endif
  2386. {
  2387. Vector3 tolua_ret = (Vector3) self->GetVector3(name);
  2388. {
  2389. #ifdef __cplusplus
  2390. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  2391. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  2392. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2393. #else
  2394. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  2395. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  2396. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2397. #endif
  2398. }
  2399. }
  2400. }
  2401. return 1;
  2402. #ifndef TOLUA_RELEASE
  2403. tolua_lerror:
  2404. tolua_error(tolua_S,"#ferror in function 'GetVector3'.",&tolua_err);
  2405. return 0;
  2406. #endif
  2407. }
  2408. #endif //#ifndef TOLUA_DISABLE
  2409. /* method: GetVector4 of class XMLElement */
  2410. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_GetVector400
  2411. static int tolua_Resource_XMLElement_GetVector400(lua_State* tolua_S)
  2412. {
  2413. #ifndef TOLUA_RELEASE
  2414. tolua_Error tolua_err;
  2415. if (
  2416. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  2417. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  2418. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2419. )
  2420. goto tolua_lerror;
  2421. else
  2422. #endif
  2423. {
  2424. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  2425. const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
  2426. #ifndef TOLUA_RELEASE
  2427. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetVector4'", NULL);
  2428. #endif
  2429. {
  2430. Vector4 tolua_ret = (Vector4) self->GetVector4(name);
  2431. {
  2432. #ifdef __cplusplus
  2433. void* tolua_obj = Mtolua_new((Vector4)(tolua_ret));
  2434. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  2435. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2436. #else
  2437. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector4));
  2438. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  2439. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2440. #endif
  2441. }
  2442. }
  2443. }
  2444. return 1;
  2445. #ifndef TOLUA_RELEASE
  2446. tolua_lerror:
  2447. tolua_error(tolua_S,"#ferror in function 'GetVector4'.",&tolua_err);
  2448. return 0;
  2449. #endif
  2450. }
  2451. #endif //#ifndef TOLUA_DISABLE
  2452. /* method: GetVector of class XMLElement */
  2453. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_GetVector00
  2454. static int tolua_Resource_XMLElement_GetVector00(lua_State* tolua_S)
  2455. {
  2456. #ifndef TOLUA_RELEASE
  2457. tolua_Error tolua_err;
  2458. if (
  2459. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  2460. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  2461. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2462. )
  2463. goto tolua_lerror;
  2464. else
  2465. #endif
  2466. {
  2467. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  2468. const char* name = ((const char*) tolua_tostring(tolua_S,2,0));
  2469. #ifndef TOLUA_RELEASE
  2470. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetVector'", NULL);
  2471. #endif
  2472. {
  2473. Vector4 tolua_ret = (Vector4) self->GetVector(name);
  2474. {
  2475. #ifdef __cplusplus
  2476. void* tolua_obj = Mtolua_new((Vector4)(tolua_ret));
  2477. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  2478. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2479. #else
  2480. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector4));
  2481. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  2482. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2483. #endif
  2484. }
  2485. }
  2486. }
  2487. return 1;
  2488. #ifndef TOLUA_RELEASE
  2489. tolua_lerror:
  2490. tolua_error(tolua_S,"#ferror in function 'GetVector'.",&tolua_err);
  2491. return 0;
  2492. #endif
  2493. }
  2494. #endif //#ifndef TOLUA_DISABLE
  2495. /* method: GetFile of class XMLElement */
  2496. #ifndef TOLUA_DISABLE_tolua_Resource_XMLElement_GetFile00
  2497. static int tolua_Resource_XMLElement_GetFile00(lua_State* tolua_S)
  2498. {
  2499. #ifndef TOLUA_RELEASE
  2500. tolua_Error tolua_err;
  2501. if (
  2502. !tolua_isusertype(tolua_S,1,"const XMLElement",0,&tolua_err) ||
  2503. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2504. )
  2505. goto tolua_lerror;
  2506. else
  2507. #endif
  2508. {
  2509. const XMLElement* self = (const XMLElement*) tolua_tousertype(tolua_S,1,0);
  2510. #ifndef TOLUA_RELEASE
  2511. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetFile'", NULL);
  2512. #endif
  2513. {
  2514. XMLFile* tolua_ret = (XMLFile*) self->GetFile();
  2515. tolua_pushusertype(tolua_S,(void*)tolua_ret,"XMLFile");
  2516. }
  2517. }
  2518. return 1;
  2519. #ifndef TOLUA_RELEASE
  2520. tolua_lerror:
  2521. tolua_error(tolua_S,"#ferror in function 'GetFile'.",&tolua_err);
  2522. return 0;
  2523. #endif
  2524. }
  2525. #endif //#ifndef TOLUA_DISABLE
  2526. /* get function: EMPTY of class XMLElement */
  2527. #ifndef TOLUA_DISABLE_tolua_get_XMLElement_EMPTY
  2528. static int tolua_get_XMLElement_EMPTY(lua_State* tolua_S)
  2529. {
  2530. tolua_pushusertype(tolua_S,(void*)&XMLElement::EMPTY,"const XMLElement");
  2531. return 1;
  2532. }
  2533. #endif //#ifndef TOLUA_DISABLE
  2534. /* method: GetRoot of class XMLFile */
  2535. #ifndef TOLUA_DISABLE_tolua_Resource_XMLFile_GetRoot00
  2536. static int tolua_Resource_XMLFile_GetRoot00(lua_State* tolua_S)
  2537. {
  2538. #ifndef TOLUA_RELEASE
  2539. tolua_Error tolua_err;
  2540. if (
  2541. !tolua_isusertype(tolua_S,1,"XMLFile",0,&tolua_err) ||
  2542. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2543. )
  2544. goto tolua_lerror;
  2545. else
  2546. #endif
  2547. {
  2548. XMLFile* self = (XMLFile*) tolua_tousertype(tolua_S,1,0);
  2549. #ifndef TOLUA_RELEASE
  2550. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetRoot'", NULL);
  2551. #endif
  2552. {
  2553. XMLElement tolua_ret = (XMLElement) self->GetRoot();
  2554. {
  2555. #ifdef __cplusplus
  2556. void* tolua_obj = Mtolua_new((XMLElement)(tolua_ret));
  2557. tolua_pushusertype(tolua_S,tolua_obj,"XMLElement");
  2558. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2559. #else
  2560. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(XMLElement));
  2561. tolua_pushusertype(tolua_S,tolua_obj,"XMLElement");
  2562. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2563. #endif
  2564. }
  2565. }
  2566. }
  2567. return 1;
  2568. #ifndef TOLUA_RELEASE
  2569. tolua_lerror:
  2570. tolua_error(tolua_S,"#ferror in function 'GetRoot'.",&tolua_err);
  2571. return 0;
  2572. #endif
  2573. }
  2574. #endif //#ifndef TOLUA_DISABLE
  2575. /* method: GetRoot of class XMLFile */
  2576. #ifndef TOLUA_DISABLE_tolua_Resource_XMLFile_GetRoot01
  2577. static int tolua_Resource_XMLFile_GetRoot01(lua_State* tolua_S)
  2578. {
  2579. tolua_Error tolua_err;
  2580. if (
  2581. !tolua_isusertype(tolua_S,1,"XMLFile",0,&tolua_err) ||
  2582. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
  2583. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2584. )
  2585. goto tolua_lerror;
  2586. else
  2587. {
  2588. XMLFile* self = (XMLFile*) tolua_tousertype(tolua_S,1,0);
  2589. const String* name = ((const String*) tolua_tousertype(tolua_S,2,0));
  2590. #ifndef TOLUA_RELEASE
  2591. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetRoot'", NULL);
  2592. #endif
  2593. {
  2594. XMLElement tolua_ret = (XMLElement) self->GetRoot(*name);
  2595. {
  2596. #ifdef __cplusplus
  2597. void* tolua_obj = Mtolua_new((XMLElement)(tolua_ret));
  2598. tolua_pushusertype(tolua_S,tolua_obj,"XMLElement");
  2599. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2600. #else
  2601. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(XMLElement));
  2602. tolua_pushusertype(tolua_S,tolua_obj,"XMLElement");
  2603. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2604. #endif
  2605. }
  2606. }
  2607. }
  2608. return 1;
  2609. tolua_lerror:
  2610. return tolua_Resource_XMLFile_GetRoot00(tolua_S);
  2611. }
  2612. #endif //#ifndef TOLUA_DISABLE
  2613. /* Open function */
  2614. TOLUA_API int tolua_Resource_open (lua_State* tolua_S)
  2615. {
  2616. tolua_open(tolua_S);
  2617. tolua_reg_types(tolua_S);
  2618. tolua_module(tolua_S,NULL,0);
  2619. tolua_beginmodule(tolua_S,NULL);
  2620. tolua_constant(tolua_S,"CF_NONE",CF_NONE);
  2621. tolua_constant(tolua_S,"CF_DXT1",CF_DXT1);
  2622. tolua_constant(tolua_S,"CF_DXT3",CF_DXT3);
  2623. tolua_constant(tolua_S,"CF_DXT5",CF_DXT5);
  2624. tolua_constant(tolua_S,"CF_ETC1",CF_ETC1);
  2625. tolua_constant(tolua_S,"CF_PVRTC_RGB_2BPP",CF_PVRTC_RGB_2BPP);
  2626. tolua_constant(tolua_S,"CF_PVRTC_RGBA_2BPP",CF_PVRTC_RGBA_2BPP);
  2627. tolua_constant(tolua_S,"CF_PVRTC_RGB_4BPP",CF_PVRTC_RGB_4BPP);
  2628. tolua_constant(tolua_S,"CF_PVRTC_RGBA_4BPP",CF_PVRTC_RGBA_4BPP);
  2629. tolua_cclass(tolua_S,"Image","Image","Resource",NULL);
  2630. tolua_beginmodule(tolua_S,"Image");
  2631. tolua_function(tolua_S,"FlipVertical",tolua_Resource_Image_FlipVertical00);
  2632. tolua_function(tolua_S,"SaveBMP",tolua_Resource_Image_SaveBMP00);
  2633. tolua_function(tolua_S,"SavePNG",tolua_Resource_Image_SavePNG00);
  2634. tolua_function(tolua_S,"SaveTGA",tolua_Resource_Image_SaveTGA00);
  2635. tolua_function(tolua_S,"SaveJPG",tolua_Resource_Image_SaveJPG00);
  2636. tolua_function(tolua_S,"GetWidth",tolua_Resource_Image_GetWidth00);
  2637. tolua_function(tolua_S,"GetHeight",tolua_Resource_Image_GetHeight00);
  2638. tolua_function(tolua_S,"GetComponents",tolua_Resource_Image_GetComponents00);
  2639. tolua_function(tolua_S,"IsCompressed",tolua_Resource_Image_IsCompressed00);
  2640. tolua_function(tolua_S,"GetCompressedFormat",tolua_Resource_Image_GetCompressedFormat00);
  2641. tolua_endmodule(tolua_S);
  2642. tolua_cclass(tolua_S,"Resource","Resource","",NULL);
  2643. tolua_beginmodule(tolua_S,"Resource");
  2644. tolua_function(tolua_S,"SetName",tolua_Resource_Resource_SetName00);
  2645. tolua_function(tolua_S,"GetName",tolua_Resource_Resource_GetName00);
  2646. tolua_function(tolua_S,"GetNameHash",tolua_Resource_Resource_GetNameHash00);
  2647. tolua_function(tolua_S,"GetMemoryUse",tolua_Resource_Resource_GetMemoryUse00);
  2648. tolua_endmodule(tolua_S);
  2649. tolua_cclass(tolua_S,"ResourceCache","ResourceCache","",NULL);
  2650. tolua_beginmodule(tolua_S,"ResourceCache");
  2651. tolua_function(tolua_S,"ReleaseAllResources",tolua_Resource_ResourceCache_ReleaseAllResources00);
  2652. tolua_function(tolua_S,"ReloadResource",tolua_Resource_ResourceCache_ReloadResource00);
  2653. tolua_function(tolua_S,"SetMemoryBudget",tolua_Resource_ResourceCache_SetMemoryBudget00);
  2654. tolua_function(tolua_S,"SetAutoReloadResources",tolua_Resource_ResourceCache_SetAutoReloadResources00);
  2655. tolua_function(tolua_S,"Exists",tolua_Resource_ResourceCache_Exists00);
  2656. tolua_function(tolua_S,"Exists",tolua_Resource_ResourceCache_Exists01);
  2657. tolua_function(tolua_S,"GetMemoryBudget",tolua_Resource_ResourceCache_GetMemoryBudget00);
  2658. tolua_function(tolua_S,"GetMemoryUse",tolua_Resource_ResourceCache_GetMemoryUse00);
  2659. tolua_function(tolua_S,"GetTotalMemoryUse",tolua_Resource_ResourceCache_GetTotalMemoryUse00);
  2660. tolua_function(tolua_S,"GetResourceName",tolua_Resource_ResourceCache_GetResourceName00);
  2661. tolua_function(tolua_S,"GetResourceFileName",tolua_Resource_ResourceCache_GetResourceFileName00);
  2662. tolua_function(tolua_S,"GetAutoReloadResources",tolua_Resource_ResourceCache_GetAutoReloadResources00);
  2663. tolua_function(tolua_S,"GetAnimation",tolua_Resource_ResourceCache_GetAnimation00);
  2664. tolua_function(tolua_S,"GetFont",tolua_Resource_ResourceCache_GetFont00);
  2665. tolua_function(tolua_S,"GetImage",tolua_Resource_ResourceCache_GetImage00);
  2666. tolua_function(tolua_S,"GetMaterial",tolua_Resource_ResourceCache_GetMaterial00);
  2667. tolua_function(tolua_S,"GetModel",tolua_Resource_ResourceCache_GetModel00);
  2668. tolua_function(tolua_S,"GetSound",tolua_Resource_ResourceCache_GetSound00);
  2669. tolua_function(tolua_S,"GetTechnique",tolua_Resource_ResourceCache_GetTechnique00);
  2670. tolua_function(tolua_S,"GetTexture2D",tolua_Resource_ResourceCache_GetTexture2D00);
  2671. tolua_function(tolua_S,"GetTextureCube",tolua_Resource_ResourceCache_GetTextureCube00);
  2672. tolua_function(tolua_S,"GetXMLFile",tolua_Resource_ResourceCache_GetXMLFile00);
  2673. tolua_endmodule(tolua_S);
  2674. tolua_function(tolua_S,"GetCache",tolua_Resource_GetCache00);
  2675. #ifdef __cplusplus
  2676. tolua_cclass(tolua_S,"XMLElement","XMLElement","",tolua_collect_XMLElement);
  2677. #else
  2678. tolua_cclass(tolua_S,"XMLElement","XMLElement","",NULL);
  2679. #endif
  2680. tolua_beginmodule(tolua_S,"XMLElement");
  2681. tolua_function(tolua_S,"IsNull",tolua_Resource_XMLElement_IsNull00);
  2682. tolua_function(tolua_S,"NotNull",tolua_Resource_XMLElement_NotNull00);
  2683. tolua_function(tolua_S,".bool",tolua_Resource_XMLElement__bool00);
  2684. tolua_function(tolua_S,"GetName",tolua_Resource_XMLElement_GetName00);
  2685. tolua_function(tolua_S,"HasChild",tolua_Resource_XMLElement_HasChild00);
  2686. tolua_function(tolua_S,"HasChild",tolua_Resource_XMLElement_HasChild01);
  2687. tolua_function(tolua_S,"GetChild",tolua_Resource_XMLElement_GetChild00);
  2688. tolua_function(tolua_S,"GetChild",tolua_Resource_XMLElement_GetChild01);
  2689. tolua_function(tolua_S,"GetNext",tolua_Resource_XMLElement_GetNext00);
  2690. tolua_function(tolua_S,"GetNext",tolua_Resource_XMLElement_GetNext01);
  2691. tolua_function(tolua_S,"GetParent",tolua_Resource_XMLElement_GetParent00);
  2692. tolua_function(tolua_S,"GetNumAttributes",tolua_Resource_XMLElement_GetNumAttributes00);
  2693. tolua_function(tolua_S,"HasAttribute",tolua_Resource_XMLElement_HasAttribute00);
  2694. tolua_function(tolua_S,"HasAttribute",tolua_Resource_XMLElement_HasAttribute01);
  2695. tolua_function(tolua_S,"GetBool",tolua_Resource_XMLElement_GetBool00);
  2696. tolua_function(tolua_S,"GetBoundingBox",tolua_Resource_XMLElement_GetBoundingBox00);
  2697. tolua_function(tolua_S,"GetColor",tolua_Resource_XMLElement_GetColor00);
  2698. tolua_function(tolua_S,"GetFloat",tolua_Resource_XMLElement_GetFloat00);
  2699. tolua_function(tolua_S,"GetUInt",tolua_Resource_XMLElement_GetUInt00);
  2700. tolua_function(tolua_S,"GetInt",tolua_Resource_XMLElement_GetInt00);
  2701. tolua_function(tolua_S,"GetIntRect",tolua_Resource_XMLElement_GetIntRect00);
  2702. tolua_function(tolua_S,"GetIntVector2",tolua_Resource_XMLElement_GetIntVector200);
  2703. tolua_function(tolua_S,"GetRect",tolua_Resource_XMLElement_GetRect00);
  2704. tolua_function(tolua_S,"GetQuaternion",tolua_Resource_XMLElement_GetQuaternion00);
  2705. tolua_function(tolua_S,"GetResourceRef",tolua_Resource_XMLElement_GetResourceRef00);
  2706. tolua_function(tolua_S,"GetResourceRefList",tolua_Resource_XMLElement_GetResourceRefList00);
  2707. tolua_function(tolua_S,"GetVector2",tolua_Resource_XMLElement_GetVector200);
  2708. tolua_function(tolua_S,"GetVector3",tolua_Resource_XMLElement_GetVector300);
  2709. tolua_function(tolua_S,"GetVector4",tolua_Resource_XMLElement_GetVector400);
  2710. tolua_function(tolua_S,"GetVector",tolua_Resource_XMLElement_GetVector00);
  2711. tolua_function(tolua_S,"GetFile",tolua_Resource_XMLElement_GetFile00);
  2712. tolua_variable(tolua_S,"EMPTY",tolua_get_XMLElement_EMPTY,NULL);
  2713. tolua_endmodule(tolua_S);
  2714. tolua_cclass(tolua_S,"XMLFile","XMLFile","Resource",NULL);
  2715. tolua_beginmodule(tolua_S,"XMLFile");
  2716. tolua_function(tolua_S,"GetRoot",tolua_Resource_XMLFile_GetRoot00);
  2717. tolua_function(tolua_S,"GetRoot",tolua_Resource_XMLFile_GetRoot01);
  2718. tolua_endmodule(tolua_S);
  2719. tolua_endmodule(tolua_S);
  2720. return 1;
  2721. }
  2722. #if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501
  2723. TOLUA_API int luaopen_Resource (lua_State* tolua_S) {
  2724. return tolua_Resource_open(tolua_S);
  2725. };
  2726. #endif