源战役客户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

321 lines
8.5 KiB

  1. //this source code was auto-generated by tolua#, do not modify it
  2. using System;
  3. using LuaInterface;
  4. public class LuaInterface_DebuggerWrap
  5. {
  6. public static void Register(LuaState L)
  7. {
  8. L.BeginStaticLibs("Debugger");
  9. L.RegFunction("Log", Log);
  10. L.RegFunction("LogWarning", LogWarning);
  11. L.RegFunction("LogError", LogError);
  12. L.RegFunction("LogException", LogException);
  13. L.RegVar("useLog", get_useLog, set_useLog);
  14. L.RegVar("threadStack", get_threadStack, set_threadStack);
  15. L.RegVar("logger", get_logger, set_logger);
  16. L.EndStaticLibs();
  17. }
  18. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  19. static int Log(IntPtr L)
  20. {
  21. try
  22. {
  23. int count = LuaDLL.lua_gettop(L);
  24. if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(string)))
  25. {
  26. string arg0 = ToLua.ToString(L, 1);
  27. LuaInterface.Debugger.Log(arg0);
  28. return 0;
  29. }
  30. else if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(object)))
  31. {
  32. object arg0 = ToLua.ToVarObject(L, 1);
  33. LuaInterface.Debugger.Log(arg0);
  34. return 0;
  35. }
  36. else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(object)))
  37. {
  38. string arg0 = ToLua.ToString(L, 1);
  39. object arg1 = ToLua.ToVarObject(L, 2);
  40. LuaInterface.Debugger.Log(arg0, arg1);
  41. return 0;
  42. }
  43. else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(object), typeof(object)))
  44. {
  45. string arg0 = ToLua.ToString(L, 1);
  46. object arg1 = ToLua.ToVarObject(L, 2);
  47. object arg2 = ToLua.ToVarObject(L, 3);
  48. LuaInterface.Debugger.Log(arg0, arg1, arg2);
  49. return 0;
  50. }
  51. else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(object), typeof(object), typeof(object)))
  52. {
  53. string arg0 = ToLua.ToString(L, 1);
  54. object arg1 = ToLua.ToVarObject(L, 2);
  55. object arg2 = ToLua.ToVarObject(L, 3);
  56. object arg3 = ToLua.ToVarObject(L, 4);
  57. LuaInterface.Debugger.Log(arg0, arg1, arg2, arg3);
  58. return 0;
  59. }
  60. else if (TypeChecker.CheckTypes(L, 1, typeof(string)) && TypeChecker.CheckParamsType(L, typeof(object), 2, count - 1))
  61. {
  62. string arg0 = ToLua.ToString(L, 1);
  63. object[] arg1 = ToLua.ToParamsObject(L, 2, count - 1);
  64. LuaInterface.Debugger.Log(arg0, arg1);
  65. return 0;
  66. }
  67. else
  68. {
  69. return LuaDLL.luaL_throw(L, "invalid arguments to method: LuaInterface.Debugger.Log");
  70. }
  71. }
  72. catch(Exception e)
  73. {
  74. return LuaDLL.toluaL_exception(L, e);
  75. }
  76. }
  77. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  78. static int LogWarning(IntPtr L)
  79. {
  80. try
  81. {
  82. int count = LuaDLL.lua_gettop(L);
  83. if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(string)))
  84. {
  85. string arg0 = ToLua.ToString(L, 1);
  86. LuaInterface.Debugger.LogWarning(arg0);
  87. return 0;
  88. }
  89. else if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(object)))
  90. {
  91. object arg0 = ToLua.ToVarObject(L, 1);
  92. LuaInterface.Debugger.LogWarning(arg0);
  93. return 0;
  94. }
  95. else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(object)))
  96. {
  97. string arg0 = ToLua.ToString(L, 1);
  98. object arg1 = ToLua.ToVarObject(L, 2);
  99. LuaInterface.Debugger.LogWarning(arg0, arg1);
  100. return 0;
  101. }
  102. else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(object), typeof(object)))
  103. {
  104. string arg0 = ToLua.ToString(L, 1);
  105. object arg1 = ToLua.ToVarObject(L, 2);
  106. object arg2 = ToLua.ToVarObject(L, 3);
  107. LuaInterface.Debugger.LogWarning(arg0, arg1, arg2);
  108. return 0;
  109. }
  110. else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(object), typeof(object), typeof(object)))
  111. {
  112. string arg0 = ToLua.ToString(L, 1);
  113. object arg1 = ToLua.ToVarObject(L, 2);
  114. object arg2 = ToLua.ToVarObject(L, 3);
  115. object arg3 = ToLua.ToVarObject(L, 4);
  116. LuaInterface.Debugger.LogWarning(arg0, arg1, arg2, arg3);
  117. return 0;
  118. }
  119. else if (TypeChecker.CheckTypes(L, 1, typeof(string)) && TypeChecker.CheckParamsType(L, typeof(object), 2, count - 1))
  120. {
  121. string arg0 = ToLua.ToString(L, 1);
  122. object[] arg1 = ToLua.ToParamsObject(L, 2, count - 1);
  123. LuaInterface.Debugger.LogWarning(arg0, arg1);
  124. return 0;
  125. }
  126. else
  127. {
  128. return LuaDLL.luaL_throw(L, "invalid arguments to method: LuaInterface.Debugger.LogWarning");
  129. }
  130. }
  131. catch(Exception e)
  132. {
  133. return LuaDLL.toluaL_exception(L, e);
  134. }
  135. }
  136. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  137. static int LogError(IntPtr L)
  138. {
  139. try
  140. {
  141. int count = LuaDLL.lua_gettop(L);
  142. if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(string)))
  143. {
  144. string arg0 = ToLua.ToString(L, 1);
  145. LuaInterface.Debugger.LogError(arg0);
  146. return 0;
  147. }
  148. else if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(object)))
  149. {
  150. object arg0 = ToLua.ToVarObject(L, 1);
  151. LuaInterface.Debugger.LogError(arg0);
  152. return 0;
  153. }
  154. else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(object)))
  155. {
  156. string arg0 = ToLua.ToString(L, 1);
  157. object arg1 = ToLua.ToVarObject(L, 2);
  158. LuaInterface.Debugger.LogError(arg0, arg1);
  159. return 0;
  160. }
  161. else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(object), typeof(object)))
  162. {
  163. string arg0 = ToLua.ToString(L, 1);
  164. object arg1 = ToLua.ToVarObject(L, 2);
  165. object arg2 = ToLua.ToVarObject(L, 3);
  166. LuaInterface.Debugger.LogError(arg0, arg1, arg2);
  167. return 0;
  168. }
  169. else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(object), typeof(object), typeof(object)))
  170. {
  171. string arg0 = ToLua.ToString(L, 1);
  172. object arg1 = ToLua.ToVarObject(L, 2);
  173. object arg2 = ToLua.ToVarObject(L, 3);
  174. object arg3 = ToLua.ToVarObject(L, 4);
  175. LuaInterface.Debugger.LogError(arg0, arg1, arg2, arg3);
  176. return 0;
  177. }
  178. else if (TypeChecker.CheckTypes(L, 1, typeof(string)) && TypeChecker.CheckParamsType(L, typeof(object), 2, count - 1))
  179. {
  180. string arg0 = ToLua.ToString(L, 1);
  181. object[] arg1 = ToLua.ToParamsObject(L, 2, count - 1);
  182. LuaInterface.Debugger.LogError(arg0, arg1);
  183. return 0;
  184. }
  185. else
  186. {
  187. return LuaDLL.luaL_throw(L, "invalid arguments to method: LuaInterface.Debugger.LogError");
  188. }
  189. }
  190. catch(Exception e)
  191. {
  192. return LuaDLL.toluaL_exception(L, e);
  193. }
  194. }
  195. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  196. static int LogException(IntPtr L)
  197. {
  198. try
  199. {
  200. int count = LuaDLL.lua_gettop(L);
  201. if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(System.Exception)))
  202. {
  203. System.Exception arg0 = (System.Exception)ToLua.ToObject(L, 1);
  204. LuaInterface.Debugger.LogException(arg0);
  205. return 0;
  206. }
  207. else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(System.Exception)))
  208. {
  209. string arg0 = ToLua.ToString(L, 1);
  210. System.Exception arg1 = (System.Exception)ToLua.ToObject(L, 2);
  211. LuaInterface.Debugger.LogException(arg0, arg1);
  212. return 0;
  213. }
  214. else
  215. {
  216. return LuaDLL.luaL_throw(L, "invalid arguments to method: LuaInterface.Debugger.LogException");
  217. }
  218. }
  219. catch(Exception e)
  220. {
  221. return LuaDLL.toluaL_exception(L, e);
  222. }
  223. }
  224. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  225. static int get_useLog(IntPtr L)
  226. {
  227. try
  228. {
  229. LuaDLL.lua_pushboolean(L, LuaInterface.Debugger.useLog);
  230. return 1;
  231. }
  232. catch(Exception e)
  233. {
  234. return LuaDLL.toluaL_exception(L, e);
  235. }
  236. }
  237. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  238. static int get_threadStack(IntPtr L)
  239. {
  240. try
  241. {
  242. LuaDLL.lua_pushstring(L, LuaInterface.Debugger.threadStack);
  243. return 1;
  244. }
  245. catch(Exception e)
  246. {
  247. return LuaDLL.toluaL_exception(L, e);
  248. }
  249. }
  250. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  251. static int get_logger(IntPtr L)
  252. {
  253. try
  254. {
  255. ToLua.PushObject(L, LuaInterface.Debugger.logger);
  256. return 1;
  257. }
  258. catch(Exception e)
  259. {
  260. return LuaDLL.toluaL_exception(L, e);
  261. }
  262. }
  263. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  264. static int set_useLog(IntPtr L)
  265. {
  266. try
  267. {
  268. bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
  269. LuaInterface.Debugger.useLog = arg0;
  270. return 0;
  271. }
  272. catch(Exception e)
  273. {
  274. return LuaDLL.toluaL_exception(L, e);
  275. }
  276. }
  277. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  278. static int set_threadStack(IntPtr L)
  279. {
  280. try
  281. {
  282. string arg0 = ToLua.CheckString(L, 2);
  283. LuaInterface.Debugger.threadStack = arg0;
  284. return 0;
  285. }
  286. catch(Exception e)
  287. {
  288. return LuaDLL.toluaL_exception(L, e);
  289. }
  290. }
  291. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  292. static int set_logger(IntPtr L)
  293. {
  294. try
  295. {
  296. LuaInterface.ILogger arg0 = (LuaInterface.ILogger)ToLua.CheckObject(L, 2, typeof(LuaInterface.ILogger));
  297. LuaInterface.Debugger.logger = arg0;
  298. return 0;
  299. }
  300. catch(Exception e)
  301. {
  302. return LuaDLL.toluaL_exception(L, e);
  303. }
  304. }
  305. }