ResourceLuaAPI.cpp 87 KB

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