NetworkLuaAPI.cpp 90 KB

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