System_Collections_Generic_Dictionary_object_objectWrap.cs 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417
  1. //this source code was auto-generated by tolua#, do not modify it
  2. using System;
  3. using LuaInterface;
  4. public class System_Collections_Generic_Dictionary_object_objectWrap
  5. {
  6. public static void Register(LuaState L)
  7. {
  8. L.BeginClass(typeof(System.Collections.Generic.Dictionary<object,object>), typeof(System.Object), "Dictionary_object_object");
  9. L.RegFunction("get_Item", get_Item);
  10. L.RegFunction("set_Item", set_Item);
  11. L.RegFunction("Add", Add);
  12. L.RegFunction("Clear", Clear);
  13. L.RegFunction("ContainsKey", ContainsKey);
  14. L.RegFunction("ContainsValue", ContainsValue);
  15. L.RegFunction("GetEnumerator", GetEnumerator);
  16. L.RegFunction("GetObjectData", GetObjectData);
  17. L.RegFunction("OnDeserialization", OnDeserialization);
  18. L.RegFunction("Remove", Remove);
  19. L.RegFunction("TryGetValue", TryGetValue);
  20. L.RegFunction("New", _CreateSystem_Collections_Generic_Dictionary_object_object);
  21. L.RegVar("this", _this, null);
  22. L.RegFunction("__tostring", ToLua.op_ToString);
  23. L.RegVar("Comparer", get_Comparer, null);
  24. L.RegVar("Count", get_Count, null);
  25. L.RegVar("Keys", get_Keys, null);
  26. L.RegVar("Values", get_Values, null);
  27. L.EndClass();
  28. }
  29. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  30. static int _CreateSystem_Collections_Generic_Dictionary_object_object(IntPtr L)
  31. {
  32. try
  33. {
  34. int count = LuaDLL.lua_gettop(L);
  35. if (count == 0)
  36. {
  37. System.Collections.Generic.Dictionary<object,object> obj = new System.Collections.Generic.Dictionary<object,object>();
  38. ToLua.PushSealed(L, obj);
  39. return 1;
  40. }
  41. else if (count == 1 && TypeChecker.CheckTypes<int>(L, 1))
  42. {
  43. int arg0 = (int)LuaDLL.lua_tonumber(L, 1);
  44. System.Collections.Generic.Dictionary<object,object> obj = new System.Collections.Generic.Dictionary<object,object>(arg0);
  45. ToLua.PushSealed(L, obj);
  46. return 1;
  47. }
  48. else if (count == 1 && TypeChecker.CheckTypes<System.Collections.Generic.IEqualityComparer<object>>(L, 1))
  49. {
  50. System.Collections.Generic.IEqualityComparer<object> arg0 = (System.Collections.Generic.IEqualityComparer<object>)ToLua.ToObject(L, 1);
  51. System.Collections.Generic.Dictionary<object,object> obj = new System.Collections.Generic.Dictionary<object,object>(arg0);
  52. ToLua.PushSealed(L, obj);
  53. return 1;
  54. }
  55. else if (count == 1 && TypeChecker.CheckTypes<System.Collections.Generic.IDictionary<object,object>>(L, 1))
  56. {
  57. System.Collections.Generic.IDictionary<object,object> arg0 = (System.Collections.Generic.IDictionary<object,object>)ToLua.ToObject(L, 1);
  58. System.Collections.Generic.Dictionary<object,object> obj = new System.Collections.Generic.Dictionary<object,object>(arg0);
  59. ToLua.PushSealed(L, obj);
  60. return 1;
  61. }
  62. else if (count == 2 && TypeChecker.CheckTypes<int, System.Collections.Generic.IEqualityComparer<object>>(L, 1))
  63. {
  64. int arg0 = (int)LuaDLL.lua_tonumber(L, 1);
  65. System.Collections.Generic.IEqualityComparer<object> arg1 = (System.Collections.Generic.IEqualityComparer<object>)ToLua.ToObject(L, 2);
  66. System.Collections.Generic.Dictionary<object,object> obj = new System.Collections.Generic.Dictionary<object,object>(arg0, arg1);
  67. ToLua.PushSealed(L, obj);
  68. return 1;
  69. }
  70. else if (count == 2 && TypeChecker.CheckTypes<System.Collections.Generic.IDictionary<object,object>, System.Collections.Generic.IEqualityComparer<object>>(L, 1))
  71. {
  72. System.Collections.Generic.IDictionary<object,object> arg0 = (System.Collections.Generic.IDictionary<object,object>)ToLua.ToObject(L, 1);
  73. System.Collections.Generic.IEqualityComparer<object> arg1 = (System.Collections.Generic.IEqualityComparer<object>)ToLua.ToObject(L, 2);
  74. System.Collections.Generic.Dictionary<object,object> obj = new System.Collections.Generic.Dictionary<object,object>(arg0, arg1);
  75. ToLua.PushSealed(L, obj);
  76. return 1;
  77. }
  78. else
  79. {
  80. return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: System.Collections.Generic.Dictionary<object,object>.New");
  81. }
  82. }
  83. catch (Exception e)
  84. {
  85. return LuaDLL.toluaL_exception(L, e);
  86. }
  87. }
  88. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  89. static int _get_this(IntPtr L)
  90. {
  91. try
  92. {
  93. ToLua.CheckArgsCount(L, 2);
  94. System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.Dictionary<object,object>));
  95. object arg0 = ToLua.ToVarObject(L, 2);
  96. object o = obj[arg0];
  97. ToLua.Push(L, o);
  98. return 1;
  99. }
  100. catch (Exception e)
  101. {
  102. return LuaDLL.toluaL_exception(L, e);
  103. }
  104. }
  105. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  106. static int _set_this(IntPtr L)
  107. {
  108. try
  109. {
  110. ToLua.CheckArgsCount(L, 3);
  111. System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.Dictionary<object,object>));
  112. object arg0 = ToLua.ToVarObject(L, 2);
  113. object arg1 = ToLua.ToVarObject(L, 3);
  114. obj[arg0] = arg1;
  115. return 0;
  116. }
  117. catch (Exception e)
  118. {
  119. return LuaDLL.toluaL_exception(L, e);
  120. }
  121. }
  122. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  123. static int _this(IntPtr L)
  124. {
  125. try
  126. {
  127. LuaDLL.lua_pushvalue(L, 1);
  128. LuaDLL.tolua_bindthis(L, _get_this, _set_this);
  129. return 1;
  130. }
  131. catch (Exception e)
  132. {
  133. return LuaDLL.toluaL_exception(L, e);
  134. }
  135. }
  136. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  137. static int get_Item(IntPtr L)
  138. {
  139. try
  140. {
  141. ToLua.CheckArgsCount(L, 2);
  142. System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.Dictionary<object,object>));
  143. object arg0 = ToLua.ToVarObject(L, 2);
  144. object o = obj[arg0];
  145. ToLua.Push(L, o);
  146. return 1;
  147. }
  148. catch (Exception e)
  149. {
  150. return LuaDLL.toluaL_exception(L, e);
  151. }
  152. }
  153. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  154. static int set_Item(IntPtr L)
  155. {
  156. try
  157. {
  158. ToLua.CheckArgsCount(L, 3);
  159. System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.Dictionary<object,object>));
  160. object arg0 = ToLua.ToVarObject(L, 2);
  161. object arg1 = ToLua.ToVarObject(L, 3);
  162. obj[arg0] = arg1;
  163. return 0;
  164. }
  165. catch (Exception e)
  166. {
  167. return LuaDLL.toluaL_exception(L, e);
  168. }
  169. }
  170. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  171. static int Add(IntPtr L)
  172. {
  173. try
  174. {
  175. ToLua.CheckArgsCount(L, 3);
  176. System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.Dictionary<object,object>));
  177. object arg0 = ToLua.ToVarObject(L, 2);
  178. object arg1 = ToLua.ToVarObject(L, 3);
  179. obj.Add(arg0, arg1);
  180. return 0;
  181. }
  182. catch (Exception e)
  183. {
  184. return LuaDLL.toluaL_exception(L, e);
  185. }
  186. }
  187. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  188. static int Clear(IntPtr L)
  189. {
  190. try
  191. {
  192. ToLua.CheckArgsCount(L, 1);
  193. System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.Dictionary<object,object>));
  194. obj.Clear();
  195. return 0;
  196. }
  197. catch (Exception e)
  198. {
  199. return LuaDLL.toluaL_exception(L, e);
  200. }
  201. }
  202. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  203. static int ContainsKey(IntPtr L)
  204. {
  205. try
  206. {
  207. ToLua.CheckArgsCount(L, 2);
  208. System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.Dictionary<object,object>));
  209. object arg0 = ToLua.ToVarObject(L, 2);
  210. bool o = obj.ContainsKey(arg0);
  211. LuaDLL.lua_pushboolean(L, o);
  212. return 1;
  213. }
  214. catch (Exception e)
  215. {
  216. return LuaDLL.toluaL_exception(L, e);
  217. }
  218. }
  219. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  220. static int ContainsValue(IntPtr L)
  221. {
  222. try
  223. {
  224. ToLua.CheckArgsCount(L, 2);
  225. System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.Dictionary<object,object>));
  226. object arg0 = ToLua.ToVarObject(L, 2);
  227. bool o = obj.ContainsValue(arg0);
  228. LuaDLL.lua_pushboolean(L, o);
  229. return 1;
  230. }
  231. catch (Exception e)
  232. {
  233. return LuaDLL.toluaL_exception(L, e);
  234. }
  235. }
  236. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  237. static int GetEnumerator(IntPtr L)
  238. {
  239. try
  240. {
  241. ToLua.CheckArgsCount(L, 1);
  242. System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.Dictionary<object,object>));
  243. System.Collections.IEnumerator o = obj.GetEnumerator();
  244. ToLua.Push(L, o);
  245. return 1;
  246. }
  247. catch (Exception e)
  248. {
  249. return LuaDLL.toluaL_exception(L, e);
  250. }
  251. }
  252. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  253. static int GetObjectData(IntPtr L)
  254. {
  255. try
  256. {
  257. ToLua.CheckArgsCount(L, 3);
  258. System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.Dictionary<object,object>));
  259. System.Runtime.Serialization.SerializationInfo arg0 = (System.Runtime.Serialization.SerializationInfo)ToLua.CheckObject(L, 2, typeof(System.Runtime.Serialization.SerializationInfo));
  260. System.Runtime.Serialization.StreamingContext arg1 = StackTraits<System.Runtime.Serialization.StreamingContext>.Check(L, 3);
  261. obj.GetObjectData(arg0, arg1);
  262. return 0;
  263. }
  264. catch (Exception e)
  265. {
  266. return LuaDLL.toluaL_exception(L, e);
  267. }
  268. }
  269. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  270. static int OnDeserialization(IntPtr L)
  271. {
  272. try
  273. {
  274. ToLua.CheckArgsCount(L, 2);
  275. System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.Dictionary<object,object>));
  276. object arg0 = ToLua.ToVarObject(L, 2);
  277. obj.OnDeserialization(arg0);
  278. return 0;
  279. }
  280. catch (Exception e)
  281. {
  282. return LuaDLL.toluaL_exception(L, e);
  283. }
  284. }
  285. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  286. static int Remove(IntPtr L)
  287. {
  288. try
  289. {
  290. ToLua.CheckArgsCount(L, 2);
  291. System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.Dictionary<object,object>));
  292. object arg0 = ToLua.ToVarObject(L, 2);
  293. bool o = obj.Remove(arg0);
  294. LuaDLL.lua_pushboolean(L, o);
  295. return 1;
  296. }
  297. catch (Exception e)
  298. {
  299. return LuaDLL.toluaL_exception(L, e);
  300. }
  301. }
  302. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  303. static int TryGetValue(IntPtr L)
  304. {
  305. try
  306. {
  307. ToLua.CheckArgsCount(L, 3);
  308. System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.Dictionary<object,object>));
  309. object arg0 = ToLua.ToVarObject(L, 2);
  310. object arg1 = null;
  311. bool o = obj.TryGetValue(arg0, out arg1);
  312. LuaDLL.lua_pushboolean(L, o);
  313. ToLua.Push(L, arg1);
  314. return 2;
  315. }
  316. catch (Exception e)
  317. {
  318. return LuaDLL.toluaL_exception(L, e);
  319. }
  320. }
  321. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  322. static int get_Comparer(IntPtr L)
  323. {
  324. object o = null;
  325. try
  326. {
  327. o = ToLua.ToObject(L, 1);
  328. System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)o;
  329. System.Collections.Generic.IEqualityComparer<object> ret = obj.Comparer;
  330. ToLua.PushObject(L, ret);
  331. return 1;
  332. }
  333. catch(Exception e)
  334. {
  335. return LuaDLL.toluaL_exception(L, e, o, "attempt to index Comparer on a nil value");
  336. }
  337. }
  338. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  339. static int get_Count(IntPtr L)
  340. {
  341. object o = null;
  342. try
  343. {
  344. o = ToLua.ToObject(L, 1);
  345. System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)o;
  346. int ret = obj.Count;
  347. LuaDLL.lua_pushinteger(L, ret);
  348. return 1;
  349. }
  350. catch(Exception e)
  351. {
  352. return LuaDLL.toluaL_exception(L, e, o, "attempt to index Count on a nil value");
  353. }
  354. }
  355. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  356. static int get_Keys(IntPtr L)
  357. {
  358. object o = null;
  359. try
  360. {
  361. o = ToLua.ToObject(L, 1);
  362. System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)o;
  363. System.Collections.Generic.Dictionary<object,object>.KeyCollection ret = obj.Keys;
  364. ToLua.PushSealed(L, ret);
  365. return 1;
  366. }
  367. catch(Exception e)
  368. {
  369. return LuaDLL.toluaL_exception(L, e, o, "attempt to index Keys on a nil value");
  370. }
  371. }
  372. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  373. static int get_Values(IntPtr L)
  374. {
  375. object o = null;
  376. try
  377. {
  378. o = ToLua.ToObject(L, 1);
  379. System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)o;
  380. System.Collections.Generic.Dictionary<object,object>.ValueCollection ret = obj.Values;
  381. ToLua.PushSealed(L, ret);
  382. return 1;
  383. }
  384. catch(Exception e)
  385. {
  386. return LuaDLL.toluaL_exception(L, e, o, "attempt to index Values on a nil value");
  387. }
  388. }
  389. }