//this source code was auto-generated by tolua#, do not modify it
using System;
using LuaInterface;

public class I18NWrap
{
	public static void Register(LuaState L)
	{
		L.BeginClass(typeof(I18N), typeof(System.Object));
		L.RegFunction("Init", Init);
		L.RegFunction("Reload", Reload);
		L.RegFunction("GetStr", GetStr);
		L.RegFunction("GetString", GetString);
		L.RegFunction("getSeparateResString", getSeparateResString);
		L.RegFunction("getResString", getResString);
		L.RegFunction("New", _CreateI18N);
		L.RegFunction("__tostring", ToLua.op_ToString);
		L.RegVar("instance", get_instance, null);
		L.EndClass();
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int _CreateI18N(IntPtr L)
	{
		try
		{
			int count = LuaDLL.lua_gettop(L);

			if (count == 0)
			{
				I18N obj = new I18N();
				ToLua.PushObject(L, obj);
				return 1;
			}
			else
			{
				return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: I18N.New");
			}
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int Init(IntPtr L)
	{
		try
		{
			ToLua.CheckArgsCount(L, 1);
			I18N obj = (I18N)ToLua.CheckObject(L, 1, typeof(I18N));
			obj.Init();
			return 0;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int Reload(IntPtr L)
	{
		try
		{
			ToLua.CheckArgsCount(L, 1);
			I18N obj = (I18N)ToLua.CheckObject(L, 1, typeof(I18N));
			obj.Reload();
			return 0;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int GetStr(IntPtr L)
	{
		try
		{
			int count = LuaDLL.lua_gettop(L);

			if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(int)))
			{
				int arg0 = (int)LuaDLL.lua_tonumber(L, 1);
				string o = I18N.GetStr(arg0);
				LuaDLL.lua_pushstring(L, o);
				return 1;
			}
			else if (TypeChecker.CheckTypes(L, 1, typeof(int)) && TypeChecker.CheckParamsType(L, typeof(object), 2, count - 1))
			{
				int arg0 = (int)LuaDLL.lua_tonumber(L, 1);
				object[] arg1 = ToLua.ToParamsObject(L, 2, count - 1);
				string o = I18N.GetStr(arg0, arg1);
				LuaDLL.lua_pushstring(L, o);
				return 1;
			}
			else
			{
				return LuaDLL.luaL_throw(L, "invalid arguments to method: I18N.GetStr");
			}
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int GetString(IntPtr L)
	{
		try
		{
			ToLua.CheckArgsCount(L, 2);
			I18N obj = (I18N)ToLua.CheckObject(L, 1, typeof(I18N));
			int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
			string o = obj.GetString(arg0);
			LuaDLL.lua_pushstring(L, o);
			return 1;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int getSeparateResString(IntPtr L)
	{
		try
		{
			ToLua.CheckArgsCount(L, 6);
			I18N obj = (I18N)ToLua.CheckObject(L, 1, typeof(I18N));
			int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
			int arg1 = (int)LuaDLL.luaL_checknumber(L, 3);
			char arg2 = (char)LuaDLL.luaL_checknumber(L, 4);
			char arg3 = (char)LuaDLL.luaL_checknumber(L, 5);
			bool arg4 = LuaDLL.luaL_checkboolean(L, 6);
			string o = obj.getSeparateResString(arg0, arg1, arg2, arg3, arg4);
			LuaDLL.lua_pushstring(L, o);
			return 1;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int getResString(IntPtr L)
	{
		try
		{
			int count = LuaDLL.lua_gettop(L);

			if (TypeChecker.CheckTypes(L, 1, typeof(I18N), typeof(int)) && TypeChecker.CheckParamsType(L, typeof(object), 3, count - 2))
			{
				I18N obj = (I18N)ToLua.ToObject(L, 1);
				int arg0 = (int)LuaDLL.lua_tonumber(L, 2);
				object[] arg1 = ToLua.ToParamsObject(L, 3, count - 2);
				string o = obj.getResString(arg0, arg1);
				LuaDLL.lua_pushstring(L, o);
				return 1;
			}
			else if (TypeChecker.CheckTypes(L, 1, typeof(I18N), typeof(bool[])) && TypeChecker.CheckParamsType(L, typeof(object), 3, count - 2))
			{
				I18N obj = (I18N)ToLua.ToObject(L, 1);
				bool[] arg0 = ToLua.CheckBoolArray(L, 2);
				object[] arg1 = ToLua.ToParamsObject(L, 3, count - 2);
				string o = obj.getResString(arg0, arg1);
				LuaDLL.lua_pushstring(L, o);
				return 1;
			}
			else
			{
				return LuaDLL.luaL_throw(L, "invalid arguments to method: I18N.getResString");
			}
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int get_instance(IntPtr L)
	{
		try
		{
			ToLua.PushObject(L, I18N.instance);
			return 1;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}
}

