| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417 |
- //this source code was auto-generated by tolua#, do not modify it
- using System;
- using LuaInterface;
- public class System_Collections_Generic_Dictionary_object_objectWrap
- {
- public static void Register(LuaState L)
- {
- L.BeginClass(typeof(System.Collections.Generic.Dictionary<object,object>), typeof(System.Object), "Dictionary_object_object");
- L.RegFunction("get_Item", get_Item);
- L.RegFunction("set_Item", set_Item);
- L.RegFunction("Add", Add);
- L.RegFunction("Clear", Clear);
- L.RegFunction("ContainsKey", ContainsKey);
- L.RegFunction("ContainsValue", ContainsValue);
- L.RegFunction("GetEnumerator", GetEnumerator);
- L.RegFunction("GetObjectData", GetObjectData);
- L.RegFunction("OnDeserialization", OnDeserialization);
- L.RegFunction("Remove", Remove);
- L.RegFunction("TryGetValue", TryGetValue);
- L.RegFunction("New", _CreateSystem_Collections_Generic_Dictionary_object_object);
- L.RegVar("this", _this, null);
- L.RegFunction("__tostring", ToLua.op_ToString);
- L.RegVar("Comparer", get_Comparer, null);
- L.RegVar("Count", get_Count, null);
- L.RegVar("Keys", get_Keys, null);
- L.RegVar("Values", get_Values, null);
- L.EndClass();
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _CreateSystem_Collections_Generic_Dictionary_object_object(IntPtr L)
- {
- try
- {
- int count = LuaDLL.lua_gettop(L);
- if (count == 0)
- {
- System.Collections.Generic.Dictionary<object,object> obj = new System.Collections.Generic.Dictionary<object,object>();
- ToLua.PushSealed(L, obj);
- return 1;
- }
- else if (count == 1 && TypeChecker.CheckTypes<int>(L, 1))
- {
- int arg0 = (int)LuaDLL.lua_tonumber(L, 1);
- System.Collections.Generic.Dictionary<object,object> obj = new System.Collections.Generic.Dictionary<object,object>(arg0);
- ToLua.PushSealed(L, obj);
- return 1;
- }
- else if (count == 1 && TypeChecker.CheckTypes<System.Collections.Generic.IEqualityComparer<object>>(L, 1))
- {
- System.Collections.Generic.IEqualityComparer<object> arg0 = (System.Collections.Generic.IEqualityComparer<object>)ToLua.ToObject(L, 1);
- System.Collections.Generic.Dictionary<object,object> obj = new System.Collections.Generic.Dictionary<object,object>(arg0);
- ToLua.PushSealed(L, obj);
- return 1;
- }
- else if (count == 1 && TypeChecker.CheckTypes<System.Collections.Generic.IDictionary<object,object>>(L, 1))
- {
- System.Collections.Generic.IDictionary<object,object> arg0 = (System.Collections.Generic.IDictionary<object,object>)ToLua.ToObject(L, 1);
- System.Collections.Generic.Dictionary<object,object> obj = new System.Collections.Generic.Dictionary<object,object>(arg0);
- ToLua.PushSealed(L, obj);
- return 1;
- }
- else if (count == 2 && TypeChecker.CheckTypes<int, System.Collections.Generic.IEqualityComparer<object>>(L, 1))
- {
- int arg0 = (int)LuaDLL.lua_tonumber(L, 1);
- System.Collections.Generic.IEqualityComparer<object> arg1 = (System.Collections.Generic.IEqualityComparer<object>)ToLua.ToObject(L, 2);
- System.Collections.Generic.Dictionary<object,object> obj = new System.Collections.Generic.Dictionary<object,object>(arg0, arg1);
- ToLua.PushSealed(L, obj);
- return 1;
- }
- else if (count == 2 && TypeChecker.CheckTypes<System.Collections.Generic.IDictionary<object,object>, System.Collections.Generic.IEqualityComparer<object>>(L, 1))
- {
- System.Collections.Generic.IDictionary<object,object> arg0 = (System.Collections.Generic.IDictionary<object,object>)ToLua.ToObject(L, 1);
- System.Collections.Generic.IEqualityComparer<object> arg1 = (System.Collections.Generic.IEqualityComparer<object>)ToLua.ToObject(L, 2);
- System.Collections.Generic.Dictionary<object,object> obj = new System.Collections.Generic.Dictionary<object,object>(arg0, arg1);
- ToLua.PushSealed(L, obj);
- return 1;
- }
- else
- {
- return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: System.Collections.Generic.Dictionary<object,object>.New");
- }
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _get_this(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.Dictionary<object,object>));
- object arg0 = ToLua.ToVarObject(L, 2);
- object o = obj[arg0];
- ToLua.Push(L, o);
- return 1;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _set_this(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 3);
- System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.Dictionary<object,object>));
- object arg0 = ToLua.ToVarObject(L, 2);
- object arg1 = ToLua.ToVarObject(L, 3);
- obj[arg0] = arg1;
- return 0;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _this(IntPtr L)
- {
- try
- {
- LuaDLL.lua_pushvalue(L, 1);
- LuaDLL.tolua_bindthis(L, _get_this, _set_this);
- return 1;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_Item(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.Dictionary<object,object>));
- object arg0 = ToLua.ToVarObject(L, 2);
- object o = obj[arg0];
- ToLua.Push(L, o);
- return 1;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int set_Item(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 3);
- System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.Dictionary<object,object>));
- object arg0 = ToLua.ToVarObject(L, 2);
- object arg1 = ToLua.ToVarObject(L, 3);
- obj[arg0] = arg1;
- return 0;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int Add(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 3);
- System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.Dictionary<object,object>));
- object arg0 = ToLua.ToVarObject(L, 2);
- object arg1 = ToLua.ToVarObject(L, 3);
- obj.Add(arg0, arg1);
- return 0;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int Clear(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.Dictionary<object,object>));
- obj.Clear();
- return 0;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int ContainsKey(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.Dictionary<object,object>));
- object arg0 = ToLua.ToVarObject(L, 2);
- bool o = obj.ContainsKey(arg0);
- LuaDLL.lua_pushboolean(L, o);
- return 1;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int ContainsValue(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.Dictionary<object,object>));
- object arg0 = ToLua.ToVarObject(L, 2);
- bool o = obj.ContainsValue(arg0);
- LuaDLL.lua_pushboolean(L, o);
- return 1;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int GetEnumerator(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.Dictionary<object,object>));
- System.Collections.IEnumerator o = obj.GetEnumerator();
- ToLua.Push(L, o);
- return 1;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int GetObjectData(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 3);
- System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.Dictionary<object,object>));
- System.Runtime.Serialization.SerializationInfo arg0 = (System.Runtime.Serialization.SerializationInfo)ToLua.CheckObject(L, 2, typeof(System.Runtime.Serialization.SerializationInfo));
- System.Runtime.Serialization.StreamingContext arg1 = StackTraits<System.Runtime.Serialization.StreamingContext>.Check(L, 3);
- obj.GetObjectData(arg0, arg1);
- return 0;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int OnDeserialization(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.Dictionary<object,object>));
- object arg0 = ToLua.ToVarObject(L, 2);
- obj.OnDeserialization(arg0);
- return 0;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int Remove(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.Dictionary<object,object>));
- object arg0 = ToLua.ToVarObject(L, 2);
- bool o = obj.Remove(arg0);
- LuaDLL.lua_pushboolean(L, o);
- return 1;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int TryGetValue(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 3);
- System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.Dictionary<object,object>));
- object arg0 = ToLua.ToVarObject(L, 2);
- object arg1 = null;
- bool o = obj.TryGetValue(arg0, out arg1);
- LuaDLL.lua_pushboolean(L, o);
- ToLua.Push(L, arg1);
- return 2;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_Comparer(IntPtr L)
- {
- object o = null;
- try
- {
- o = ToLua.ToObject(L, 1);
- System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)o;
- System.Collections.Generic.IEqualityComparer<object> ret = obj.Comparer;
- ToLua.PushObject(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o, "attempt to index Comparer on a nil value");
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_Count(IntPtr L)
- {
- object o = null;
- try
- {
- o = ToLua.ToObject(L, 1);
- System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)o;
- int ret = obj.Count;
- LuaDLL.lua_pushinteger(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o, "attempt to index Count on a nil value");
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_Keys(IntPtr L)
- {
- object o = null;
- try
- {
- o = ToLua.ToObject(L, 1);
- System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)o;
- System.Collections.Generic.Dictionary<object,object>.KeyCollection ret = obj.Keys;
- ToLua.PushSealed(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o, "attempt to index Keys on a nil value");
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_Values(IntPtr L)
- {
- object o = null;
- try
- {
- o = ToLua.ToObject(L, 1);
- System.Collections.Generic.Dictionary<object,object> obj = (System.Collections.Generic.Dictionary<object,object>)o;
- System.Collections.Generic.Dictionary<object,object>.ValueCollection ret = obj.Values;
- ToLua.PushSealed(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o, "attempt to index Values on a nil value");
- }
- }
- }
|