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

public class VersionMgrWrap
{
	public static void Register(LuaState L)
	{
		L.BeginClass(typeof(VersionMgr), typeof(System.Object));
		L.RegFunction("Init", Init);
		L.RegFunction("UpdateResVersion", UpdateResVersion);
		L.RegFunction("DeleteCacheResVersion", DeleteCacheResVersion);
		L.RegFunction("CompareVersion", CompareVersion);
		L.RegFunction("New", _CreateVersionMgr);
		L.RegFunction("__tostring", ToLua.op_ToString);
		L.RegVar("instance", get_instance, null);
		L.RegVar("appVersion", get_appVersion, null);
		L.RegVar("resVersion", get_resVersion, null);
		L.EndClass();
	}

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

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

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

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int UpdateResVersion(IntPtr L)
	{
		try
		{
			ToLua.CheckArgsCount(L, 2);
			VersionMgr obj = (VersionMgr)ToLua.CheckObject<VersionMgr>(L, 1);
			string arg0 = ToLua.CheckString(L, 2);
			obj.UpdateResVersion(arg0);
			return 0;
		}
		catch (Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

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

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int CompareVersion(IntPtr L)
	{
		try
		{
			ToLua.CheckArgsCount(L, 2);
			string arg0 = ToLua.CheckString(L, 1);
			string arg1 = ToLua.CheckString(L, 2);
			int o = VersionMgr.CompareVersion(arg0, arg1);
			LuaDLL.lua_pushinteger(L, o);
			return 1;
		}
		catch (Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

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

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int get_appVersion(IntPtr L)
	{
		object o = null;

		try
		{
			o = ToLua.ToObject(L, 1);
			VersionMgr obj = (VersionMgr)o;
			string ret = obj.appVersion;
			LuaDLL.lua_pushstring(L, ret);
			return 1;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e, o, "attempt to index appVersion on a nil value");
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int get_resVersion(IntPtr L)
	{
		object o = null;

		try
		{
			o = ToLua.ToObject(L, 1);
			VersionMgr obj = (VersionMgr)o;
			string ret = obj.resVersion;
			LuaDLL.lua_pushstring(L, ret);
			return 1;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e, o, "attempt to index resVersion on a nil value");
		}
	}
}

