System_Int64Wrap.cs 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. //this source code was auto-generated by tolua#, do not modify it
  2. using System;
  3. using LuaInterface;
  4. public class System_Int64Wrap
  5. {
  6. public static void Register(LuaState L)
  7. {
  8. L.BeginClass(typeof(System.Int64), null);
  9. L.RegFunction("CompareTo", CompareTo);
  10. L.RegFunction("Equals", Equals);
  11. L.RegFunction("GetHashCode", GetHashCode);
  12. L.RegFunction("ToString", ToString);
  13. //L.RegFunction("TryFormat", TryFormat);
  14. L.RegFunction("Parse", Parse);
  15. L.RegFunction("TryParse", TryParse);
  16. L.RegFunction("GetTypeCode", GetTypeCode);
  17. L.RegFunction("New", _CreateSystem_Int64);
  18. L.RegFunction("__tostring", ToLua.op_ToString);
  19. L.RegConstant("MaxValue", 9.22337203685478E+18);
  20. L.RegConstant("MinValue", -9.22337203685478E+18);
  21. L.EndClass();
  22. }
  23. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  24. static int _CreateSystem_Int64(IntPtr L)
  25. {
  26. System.Int64 obj = new System.Int64();
  27. LuaDLL.tolua_pushint64(L, obj);
  28. return 1;
  29. }
  30. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  31. static int CompareTo(IntPtr L)
  32. {
  33. try
  34. {
  35. int count = LuaDLL.lua_gettop(L);
  36. if (count == 2 && TypeChecker.CheckTypes<long>(L, 2))
  37. {
  38. System.Int64 obj = (System.Int64)ToLua.CheckObject(L, 1, typeof(System.Int64));
  39. long arg0 = LuaDLL.tolua_toint64(L, 2);
  40. int o = obj.CompareTo(arg0);
  41. LuaDLL.lua_pushinteger(L, o);
  42. ToLua.SetBack(L, 1, obj);
  43. return 1;
  44. }
  45. else if (count == 2 && TypeChecker.CheckTypes<object>(L, 2))
  46. {
  47. System.Int64 obj = (System.Int64)ToLua.CheckObject(L, 1, typeof(System.Int64));
  48. object arg0 = ToLua.ToVarObject(L, 2);
  49. int o = obj.CompareTo(arg0);
  50. LuaDLL.lua_pushinteger(L, o);
  51. ToLua.SetBack(L, 1, obj);
  52. return 1;
  53. }
  54. else
  55. {
  56. return LuaDLL.luaL_throw(L, "invalid arguments to method: System.Int64.CompareTo");
  57. }
  58. }
  59. catch (Exception e)
  60. {
  61. return LuaDLL.toluaL_exception(L, e);
  62. }
  63. }
  64. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  65. static int Equals(IntPtr L)
  66. {
  67. try
  68. {
  69. int count = LuaDLL.lua_gettop(L);
  70. if (count == 2 && TypeChecker.CheckTypes<long>(L, 2))
  71. {
  72. System.Int64 obj = (System.Int64)ToLua.CheckObject(L, 1, typeof(System.Int64));
  73. long arg0 = LuaDLL.tolua_toint64(L, 2);
  74. bool o = obj.Equals(arg0);
  75. LuaDLL.lua_pushboolean(L, o);
  76. ToLua.SetBack(L, 1, obj);
  77. return 1;
  78. }
  79. else if (count == 2 && TypeChecker.CheckTypes<object>(L, 2))
  80. {
  81. System.Int64 obj = (System.Int64)ToLua.CheckObject(L, 1, typeof(System.Int64));
  82. object arg0 = ToLua.ToVarObject(L, 2);
  83. bool o = obj.Equals(arg0);
  84. LuaDLL.lua_pushboolean(L, o);
  85. ToLua.SetBack(L, 1, obj);
  86. return 1;
  87. }
  88. else
  89. {
  90. return LuaDLL.luaL_throw(L, "invalid arguments to method: System.Int64.Equals");
  91. }
  92. }
  93. catch (Exception e)
  94. {
  95. return LuaDLL.toluaL_exception(L, e);
  96. }
  97. }
  98. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  99. static int GetHashCode(IntPtr L)
  100. {
  101. try
  102. {
  103. ToLua.CheckArgsCount(L, 1);
  104. System.Int64 obj = (System.Int64)ToLua.CheckObject(L, 1, typeof(System.Int64));
  105. int o = obj.GetHashCode();
  106. LuaDLL.lua_pushinteger(L, o);
  107. ToLua.SetBack(L, 1, obj);
  108. return 1;
  109. }
  110. catch (Exception e)
  111. {
  112. return LuaDLL.toluaL_exception(L, e);
  113. }
  114. }
  115. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  116. static int ToString(IntPtr L)
  117. {
  118. try
  119. {
  120. int count = LuaDLL.lua_gettop(L);
  121. if (count == 1)
  122. {
  123. System.Int64 obj = (System.Int64)ToLua.CheckObject(L, 1, typeof(System.Int64));
  124. string o = obj.ToString();
  125. LuaDLL.lua_pushstring(L, o);
  126. return 1;
  127. }
  128. else if (count == 2 && TypeChecker.CheckTypes<System.IFormatProvider>(L, 2))
  129. {
  130. System.Int64 obj = (System.Int64)ToLua.CheckObject(L, 1, typeof(System.Int64));
  131. System.IFormatProvider arg0 = (System.IFormatProvider)ToLua.ToObject(L, 2);
  132. string o = obj.ToString(arg0);
  133. LuaDLL.lua_pushstring(L, o);
  134. return 1;
  135. }
  136. else if (count == 2 && TypeChecker.CheckTypes<string>(L, 2))
  137. {
  138. System.Int64 obj = (System.Int64)ToLua.CheckObject(L, 1, typeof(System.Int64));
  139. string arg0 = ToLua.ToString(L, 2);
  140. string o = obj.ToString(arg0);
  141. LuaDLL.lua_pushstring(L, o);
  142. return 1;
  143. }
  144. else if (count == 3)
  145. {
  146. System.Int64 obj = (System.Int64)ToLua.CheckObject(L, 1, typeof(System.Int64));
  147. string arg0 = ToLua.CheckString(L, 2);
  148. System.IFormatProvider arg1 = (System.IFormatProvider)ToLua.CheckObject<System.IFormatProvider>(L, 3);
  149. string o = obj.ToString(arg0, arg1);
  150. LuaDLL.lua_pushstring(L, o);
  151. return 1;
  152. }
  153. else
  154. {
  155. return LuaDLL.luaL_throw(L, "invalid arguments to method: System.Int64.ToString");
  156. }
  157. }
  158. catch (Exception e)
  159. {
  160. return LuaDLL.toluaL_exception(L, e);
  161. }
  162. }
  163. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  164. static int Parse(IntPtr L)
  165. {
  166. try
  167. {
  168. int count = LuaDLL.lua_gettop(L);
  169. if (count == 1 && TypeChecker.CheckTypes<string>(L, 1))
  170. {
  171. string arg0 = ToLua.ToString(L, 1);
  172. long o = System.Int64.Parse(arg0);
  173. LuaDLL.tolua_pushint64(L, o);
  174. return 1;
  175. }
  176. else if (count == 2 && TypeChecker.CheckTypes<string, System.Globalization.NumberStyles>(L, 1))
  177. {
  178. string arg0 = ToLua.ToString(L, 1);
  179. System.Globalization.NumberStyles arg1 = (System.Globalization.NumberStyles)ToLua.ToObject(L, 2);
  180. long o = System.Int64.Parse(arg0, arg1);
  181. LuaDLL.tolua_pushint64(L, o);
  182. return 1;
  183. }
  184. else if (count == 2 && TypeChecker.CheckTypes<string, System.IFormatProvider>(L, 1))
  185. {
  186. string arg0 = ToLua.ToString(L, 1);
  187. System.IFormatProvider arg1 = (System.IFormatProvider)ToLua.ToObject(L, 2);
  188. long o = System.Int64.Parse(arg0, arg1);
  189. LuaDLL.tolua_pushint64(L, o);
  190. return 1;
  191. }
  192. else if (count == 3 && TypeChecker.CheckTypes<string, System.Globalization.NumberStyles, System.IFormatProvider>(L, 1))
  193. {
  194. string arg0 = ToLua.ToString(L, 1);
  195. System.Globalization.NumberStyles arg1 = (System.Globalization.NumberStyles)ToLua.ToObject(L, 2);
  196. System.IFormatProvider arg2 = (System.IFormatProvider)ToLua.ToObject(L, 3);
  197. long o = System.Int64.Parse(arg0, arg1, arg2);
  198. LuaDLL.tolua_pushint64(L, o);
  199. return 1;
  200. }
  201. else
  202. {
  203. return LuaDLL.luaL_throw(L, "invalid arguments to method: System.Int64.Parse");
  204. }
  205. }
  206. catch (Exception e)
  207. {
  208. return LuaDLL.toluaL_exception(L, e);
  209. }
  210. }
  211. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  212. static int TryParse(IntPtr L)
  213. {
  214. try
  215. {
  216. int count = LuaDLL.lua_gettop(L);
  217. if (count == 2 && TypeChecker.CheckTypes<string, LuaInterface.LuaOut<long>>(L, 1))
  218. {
  219. string arg0 = ToLua.ToString(L, 1);
  220. long arg1;
  221. bool o = System.Int64.TryParse(arg0, out arg1);
  222. LuaDLL.lua_pushboolean(L, o);
  223. LuaDLL.tolua_pushint64(L, arg1);
  224. return 2;
  225. }
  226. else if (count == 4 && TypeChecker.CheckTypes<string, System.Globalization.NumberStyles, System.IFormatProvider, LuaInterface.LuaOut<long>>(L, 1))
  227. {
  228. string arg0 = ToLua.ToString(L, 1);
  229. System.Globalization.NumberStyles arg1 = (System.Globalization.NumberStyles)ToLua.ToObject(L, 2);
  230. System.IFormatProvider arg2 = (System.IFormatProvider)ToLua.ToObject(L, 3);
  231. long arg3;
  232. bool o = System.Int64.TryParse(arg0, arg1, arg2, out arg3);
  233. LuaDLL.lua_pushboolean(L, o);
  234. LuaDLL.tolua_pushint64(L, arg3);
  235. return 2;
  236. }
  237. else
  238. {
  239. return LuaDLL.luaL_throw(L, "invalid arguments to method: System.Int64.TryParse");
  240. }
  241. }
  242. catch (Exception e)
  243. {
  244. return LuaDLL.toluaL_exception(L, e);
  245. }
  246. }
  247. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  248. static int GetTypeCode(IntPtr L)
  249. {
  250. try
  251. {
  252. ToLua.CheckArgsCount(L, 1);
  253. System.Int64 obj = (System.Int64)ToLua.CheckObject(L, 1, typeof(System.Int64));
  254. System.TypeCode o = obj.GetTypeCode();
  255. ToLua.Push(L, o);
  256. ToLua.SetBack(L, 1, obj);
  257. return 1;
  258. }
  259. catch (Exception e)
  260. {
  261. return LuaDLL.toluaL_exception(L, e);
  262. }
  263. }
  264. }