DebugHelperWrap.cs 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553
  1. //this source code was auto-generated by tolua#, do not modify it
  2. using System;
  3. using LuaInterface;
  4. public class DebugHelperWrap
  5. {
  6. public static void Register(LuaState L)
  7. {
  8. L.BeginClass(typeof(DebugHelper), typeof(UnityEngine.MonoBehaviour), "DebugHelper");
  9. L.RegFunction("AddLoggerWnd", AddLoggerWnd);
  10. L.RegFunction("OpenLoger", OpenLoger);
  11. L.RegFunction("CloseLoger", CloseLoger);
  12. L.RegFunction("BeginLogs", BeginLogs);
  13. L.RegFunction("CloseLogs", CloseLogs);
  14. L.RegFunction("ClearLogs", ClearLogs);
  15. L.RegFunction("GetLoger", GetLoger);
  16. L.RegFunction("GetLogerPath", GetLogerPath);
  17. L.RegFunction("EditorAssert", EditorAssert);
  18. L.RegFunction("Assert", Assert);
  19. L.RegFunction("LogInternal", LogInternal);
  20. L.RegFunction("Log", Log);
  21. L.RegFunction("LogError", LogError);
  22. L.RegFunction("LogWarning", LogWarning);
  23. L.RegFunction("LogException", LogException);
  24. L.RegFunction("__eq", op_Equality);
  25. L.RegFunction("__tostring", ToLua.op_ToString);
  26. L.RegVar("Tag_BHY", get_Tag_BHY, set_Tag_BHY);
  27. L.RegVar("instance", get_instance, set_instance);
  28. L.RegVar("LogLevel", get_LogLevel, set_LogLevel);
  29. L.RegVar("logMode", get_logMode, set_logMode);
  30. L.RegVar("enableLog", get_enableLog, set_enableLog);
  31. L.RegVar("logRootPath", get_logRootPath, null);
  32. L.EndClass();
  33. }
  34. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  35. static int AddLoggerWnd(IntPtr L)
  36. {
  37. try
  38. {
  39. ToLua.CheckArgsCount(L, 1);
  40. UnityEngine.ILogger arg0 = (UnityEngine.ILogger)ToLua.CheckObject<UnityEngine.ILogger>(L, 1);
  41. DebugHelper.AddLoggerWnd(arg0);
  42. return 0;
  43. }
  44. catch (Exception e)
  45. {
  46. return LuaDLL.toluaL_exception(L, e);
  47. }
  48. }
  49. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  50. static int OpenLoger(IntPtr L)
  51. {
  52. try
  53. {
  54. ToLua.CheckArgsCount(L, 2);
  55. SLogCategory arg0 = (SLogCategory)ToLua.CheckObject(L, 1, typeof(SLogCategory));
  56. string arg1 = ToLua.CheckString(L, 2);
  57. DebugHelper.OpenLoger(arg0, arg1);
  58. return 0;
  59. }
  60. catch (Exception e)
  61. {
  62. return LuaDLL.toluaL_exception(L, e);
  63. }
  64. }
  65. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  66. static int CloseLoger(IntPtr L)
  67. {
  68. try
  69. {
  70. ToLua.CheckArgsCount(L, 1);
  71. SLogCategory arg0 = (SLogCategory)ToLua.CheckObject(L, 1, typeof(SLogCategory));
  72. DebugHelper.CloseLoger(arg0);
  73. return 0;
  74. }
  75. catch (Exception e)
  76. {
  77. return LuaDLL.toluaL_exception(L, e);
  78. }
  79. }
  80. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  81. static int BeginLogs(IntPtr L)
  82. {
  83. try
  84. {
  85. ToLua.CheckArgsCount(L, 0);
  86. DebugHelper.BeginLogs();
  87. return 0;
  88. }
  89. catch (Exception e)
  90. {
  91. return LuaDLL.toluaL_exception(L, e);
  92. }
  93. }
  94. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  95. static int CloseLogs(IntPtr L)
  96. {
  97. try
  98. {
  99. ToLua.CheckArgsCount(L, 0);
  100. DebugHelper.CloseLogs();
  101. return 0;
  102. }
  103. catch (Exception e)
  104. {
  105. return LuaDLL.toluaL_exception(L, e);
  106. }
  107. }
  108. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  109. static int ClearLogs(IntPtr L)
  110. {
  111. try
  112. {
  113. int count = LuaDLL.lua_gettop(L);
  114. if (count == 0)
  115. {
  116. DebugHelper.ClearLogs();
  117. return 0;
  118. }
  119. else if (count == 1)
  120. {
  121. int arg0 = (int)LuaDLL.luaL_checknumber(L, 1);
  122. DebugHelper.ClearLogs(arg0);
  123. return 0;
  124. }
  125. else
  126. {
  127. return LuaDLL.luaL_throw(L, "invalid arguments to method: DebugHelper.ClearLogs");
  128. }
  129. }
  130. catch (Exception e)
  131. {
  132. return LuaDLL.toluaL_exception(L, e);
  133. }
  134. }
  135. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  136. static int GetLoger(IntPtr L)
  137. {
  138. try
  139. {
  140. ToLua.CheckArgsCount(L, 1);
  141. SLogCategory arg0 = (SLogCategory)ToLua.CheckObject(L, 1, typeof(SLogCategory));
  142. SLogObj o = DebugHelper.GetLoger(arg0);
  143. ToLua.PushObject(L, o);
  144. return 1;
  145. }
  146. catch (Exception e)
  147. {
  148. return LuaDLL.toluaL_exception(L, e);
  149. }
  150. }
  151. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  152. static int GetLogerPath(IntPtr L)
  153. {
  154. try
  155. {
  156. ToLua.CheckArgsCount(L, 1);
  157. SLogCategory arg0 = (SLogCategory)ToLua.CheckObject(L, 1, typeof(SLogCategory));
  158. string o = DebugHelper.GetLogerPath(arg0);
  159. LuaDLL.lua_pushstring(L, o);
  160. return 1;
  161. }
  162. catch (Exception e)
  163. {
  164. return LuaDLL.toluaL_exception(L, e);
  165. }
  166. }
  167. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  168. static int EditorAssert(IntPtr L)
  169. {
  170. try
  171. {
  172. int count = LuaDLL.lua_gettop(L);
  173. if (count == 2 && TypeChecker.CheckTypes<bool, string>(L, 1))
  174. {
  175. bool arg0 = LuaDLL.lua_toboolean(L, 1);
  176. string arg1 = ToLua.ToString(L, 2);
  177. DebugHelper.EditorAssert(arg0, arg1);
  178. return 0;
  179. }
  180. else if (TypeChecker.CheckTypes<bool, string>(L, 1) && TypeChecker.CheckParamsType<object>(L, 3, count - 2))
  181. {
  182. bool arg0 = LuaDLL.lua_toboolean(L, 1);
  183. string arg1 = ToLua.ToString(L, 2);
  184. object[] arg2 = ToLua.ToParamsObject(L, 3, count - 2);
  185. DebugHelper.EditorAssert(arg0, arg1, arg2);
  186. return 0;
  187. }
  188. else
  189. {
  190. return LuaDLL.luaL_throw(L, "invalid arguments to method: DebugHelper.EditorAssert");
  191. }
  192. }
  193. catch (Exception e)
  194. {
  195. return LuaDLL.toluaL_exception(L, e);
  196. }
  197. }
  198. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  199. static int Assert(IntPtr L)
  200. {
  201. try
  202. {
  203. int count = LuaDLL.lua_gettop(L);
  204. if (count == 1 && TypeChecker.CheckTypes<bool>(L, 1))
  205. {
  206. bool arg0 = LuaDLL.lua_toboolean(L, 1);
  207. DebugHelper.Assert(arg0);
  208. return 0;
  209. }
  210. else if (count == 2 && TypeChecker.CheckTypes<bool, string>(L, 1))
  211. {
  212. bool arg0 = LuaDLL.lua_toboolean(L, 1);
  213. string arg1 = ToLua.ToString(L, 2);
  214. DebugHelper.Assert(arg0, arg1);
  215. return 0;
  216. }
  217. else if (TypeChecker.CheckTypes<bool, string>(L, 1) && TypeChecker.CheckParamsType<object>(L, 3, count - 2))
  218. {
  219. bool arg0 = LuaDLL.lua_toboolean(L, 1);
  220. string arg1 = ToLua.ToString(L, 2);
  221. object[] arg2 = ToLua.ToParamsObject(L, 3, count - 2);
  222. DebugHelper.Assert(arg0, arg1, arg2);
  223. return 0;
  224. }
  225. else
  226. {
  227. return LuaDLL.luaL_throw(L, "invalid arguments to method: DebugHelper.Assert");
  228. }
  229. }
  230. catch (Exception e)
  231. {
  232. return LuaDLL.toluaL_exception(L, e);
  233. }
  234. }
  235. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  236. static int LogInternal(IntPtr L)
  237. {
  238. try
  239. {
  240. ToLua.CheckArgsCount(L, 2);
  241. SLogCategory arg0 = (SLogCategory)ToLua.CheckObject(L, 1, typeof(SLogCategory));
  242. string arg1 = ToLua.CheckString(L, 2);
  243. DebugHelper.LogInternal(arg0, arg1);
  244. return 0;
  245. }
  246. catch (Exception e)
  247. {
  248. return LuaDLL.toluaL_exception(L, e);
  249. }
  250. }
  251. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  252. static int Log(IntPtr L)
  253. {
  254. try
  255. {
  256. int count = LuaDLL.lua_gettop(L);
  257. if (count == 1 && TypeChecker.CheckTypes<string>(L, 1))
  258. {
  259. string arg0 = ToLua.ToString(L, 1);
  260. DebugHelper.Log(arg0);
  261. return 0;
  262. }
  263. else if (TypeChecker.CheckTypes<object>(L, 1) && TypeChecker.CheckParamsType<object>(L, 2, count - 1))
  264. {
  265. object arg0 = ToLua.ToVarObject(L, 1);
  266. object[] arg1 = ToLua.ToParamsObject(L, 2, count - 1);
  267. DebugHelper.Log(arg0, arg1);
  268. return 0;
  269. }
  270. else
  271. {
  272. return LuaDLL.luaL_throw(L, "invalid arguments to method: DebugHelper.Log");
  273. }
  274. }
  275. catch (Exception e)
  276. {
  277. return LuaDLL.toluaL_exception(L, e);
  278. }
  279. }
  280. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  281. static int LogError(IntPtr L)
  282. {
  283. try
  284. {
  285. int count = LuaDLL.lua_gettop(L);
  286. if (count == 1 && TypeChecker.CheckTypes<string>(L, 1))
  287. {
  288. string arg0 = ToLua.ToString(L, 1);
  289. DebugHelper.LogError(arg0);
  290. return 0;
  291. }
  292. else if (TypeChecker.CheckTypes<object>(L, 1) && TypeChecker.CheckParamsType<object>(L, 2, count - 1))
  293. {
  294. object arg0 = ToLua.ToVarObject(L, 1);
  295. object[] arg1 = ToLua.ToParamsObject(L, 2, count - 1);
  296. DebugHelper.LogError(arg0, arg1);
  297. return 0;
  298. }
  299. else
  300. {
  301. return LuaDLL.luaL_throw(L, "invalid arguments to method: DebugHelper.LogError");
  302. }
  303. }
  304. catch (Exception e)
  305. {
  306. return LuaDLL.toluaL_exception(L, e);
  307. }
  308. }
  309. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  310. static int LogWarning(IntPtr L)
  311. {
  312. try
  313. {
  314. int count = LuaDLL.lua_gettop(L);
  315. if (count == 1 && TypeChecker.CheckTypes<string>(L, 1))
  316. {
  317. string arg0 = ToLua.ToString(L, 1);
  318. DebugHelper.LogWarning(arg0);
  319. return 0;
  320. }
  321. else if (TypeChecker.CheckTypes<object>(L, 1) && TypeChecker.CheckParamsType<object>(L, 2, count - 1))
  322. {
  323. object arg0 = ToLua.ToVarObject(L, 1);
  324. object[] arg1 = ToLua.ToParamsObject(L, 2, count - 1);
  325. DebugHelper.LogWarning(arg0, arg1);
  326. return 0;
  327. }
  328. else
  329. {
  330. return LuaDLL.luaL_throw(L, "invalid arguments to method: DebugHelper.LogWarning");
  331. }
  332. }
  333. catch (Exception e)
  334. {
  335. return LuaDLL.toluaL_exception(L, e);
  336. }
  337. }
  338. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  339. static int LogException(IntPtr L)
  340. {
  341. try
  342. {
  343. ToLua.CheckArgsCount(L, 1);
  344. System.Exception arg0 = (System.Exception)ToLua.CheckObject<System.Exception>(L, 1);
  345. DebugHelper.LogException(arg0);
  346. return 0;
  347. }
  348. catch (Exception e)
  349. {
  350. return LuaDLL.toluaL_exception(L, e);
  351. }
  352. }
  353. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  354. static int op_Equality(IntPtr L)
  355. {
  356. try
  357. {
  358. ToLua.CheckArgsCount(L, 2);
  359. UnityEngine.Object arg0 = (UnityEngine.Object)ToLua.ToObject(L, 1);
  360. UnityEngine.Object arg1 = (UnityEngine.Object)ToLua.ToObject(L, 2);
  361. bool o = arg0 == arg1;
  362. LuaDLL.lua_pushboolean(L, o);
  363. return 1;
  364. }
  365. catch (Exception e)
  366. {
  367. return LuaDLL.toluaL_exception(L, e);
  368. }
  369. }
  370. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  371. static int get_Tag_BHY(IntPtr L)
  372. {
  373. try
  374. {
  375. LuaDLL.lua_pushstring(L, DebugHelper.Tag_BHY);
  376. return 1;
  377. }
  378. catch (Exception e)
  379. {
  380. return LuaDLL.toluaL_exception(L, e);
  381. }
  382. }
  383. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  384. static int get_instance(IntPtr L)
  385. {
  386. try
  387. {
  388. ToLua.Push(L, DebugHelper.instance);
  389. return 1;
  390. }
  391. catch (Exception e)
  392. {
  393. return LuaDLL.toluaL_exception(L, e);
  394. }
  395. }
  396. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  397. static int get_LogLevel(IntPtr L)
  398. {
  399. try
  400. {
  401. ToLua.Push(L, DebugHelper.LogLevel);
  402. return 1;
  403. }
  404. catch (Exception e)
  405. {
  406. return LuaDLL.toluaL_exception(L, e);
  407. }
  408. }
  409. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  410. static int get_logMode(IntPtr L)
  411. {
  412. try
  413. {
  414. ToLua.Push(L, DebugHelper.logMode);
  415. return 1;
  416. }
  417. catch (Exception e)
  418. {
  419. return LuaDLL.toluaL_exception(L, e);
  420. }
  421. }
  422. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  423. static int get_enableLog(IntPtr L)
  424. {
  425. try
  426. {
  427. LuaDLL.lua_pushboolean(L, DebugHelper.enableLog);
  428. return 1;
  429. }
  430. catch (Exception e)
  431. {
  432. return LuaDLL.toluaL_exception(L, e);
  433. }
  434. }
  435. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  436. static int get_logRootPath(IntPtr L)
  437. {
  438. try
  439. {
  440. LuaDLL.lua_pushstring(L, DebugHelper.logRootPath);
  441. return 1;
  442. }
  443. catch (Exception e)
  444. {
  445. return LuaDLL.toluaL_exception(L, e);
  446. }
  447. }
  448. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  449. static int set_Tag_BHY(IntPtr L)
  450. {
  451. try
  452. {
  453. string arg0 = ToLua.CheckString(L, 2);
  454. DebugHelper.Tag_BHY = arg0;
  455. return 0;
  456. }
  457. catch (Exception e)
  458. {
  459. return LuaDLL.toluaL_exception(L, e);
  460. }
  461. }
  462. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  463. static int set_instance(IntPtr L)
  464. {
  465. try
  466. {
  467. DebugHelper arg0 = (DebugHelper)ToLua.CheckObject<DebugHelper>(L, 2);
  468. DebugHelper.instance = arg0;
  469. return 0;
  470. }
  471. catch (Exception e)
  472. {
  473. return LuaDLL.toluaL_exception(L, e);
  474. }
  475. }
  476. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  477. static int set_LogLevel(IntPtr L)
  478. {
  479. try
  480. {
  481. LogLevel arg0 = (LogLevel)ToLua.CheckObject(L, 2, typeof(LogLevel));
  482. DebugHelper.LogLevel = arg0;
  483. return 0;
  484. }
  485. catch (Exception e)
  486. {
  487. return LuaDLL.toluaL_exception(L, e);
  488. }
  489. }
  490. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  491. static int set_logMode(IntPtr L)
  492. {
  493. try
  494. {
  495. SLogTypeDef arg0 = (SLogTypeDef)ToLua.CheckObject(L, 2, typeof(SLogTypeDef));
  496. DebugHelper.logMode = arg0;
  497. return 0;
  498. }
  499. catch (Exception e)
  500. {
  501. return LuaDLL.toluaL_exception(L, e);
  502. }
  503. }
  504. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  505. static int set_enableLog(IntPtr L)
  506. {
  507. try
  508. {
  509. bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
  510. DebugHelper.enableLog = arg0;
  511. return 0;
  512. }
  513. catch (Exception e)
  514. {
  515. return LuaDLL.toluaL_exception(L, e);
  516. }
  517. }
  518. }