176 lines
		
	
	
		
			3.8 KiB
		
	
	
	
		
			C#
		
	
			
		
		
	
	
			176 lines
		
	
	
		
			3.8 KiB
		
	
	
	
		
			C#
		
	
//this source code was auto-generated by tolua#, do not modify it
 | 
						|
using System;
 | 
						|
using LuaInterface;
 | 
						|
 | 
						|
public class ConvertUtilWrap
 | 
						|
{
 | 
						|
	public static void Register(LuaState L)
 | 
						|
	{
 | 
						|
		L.BeginStaticLibs("ConvertUtil");
 | 
						|
		L.RegFunction("ObjToString", ObjToString);
 | 
						|
		L.RegFunction("ObjToUpdateProgress", ObjToUpdateProgress);
 | 
						|
		L.RegFunction("ObjToFloat", ObjToFloat);
 | 
						|
		L.RegFunction("ObjToInt", ObjToInt);
 | 
						|
		L.RegFunction("StrToLong", StrToLong);
 | 
						|
		L.RegFunction("StrToInt", StrToInt);
 | 
						|
		L.RegFunction("StrToByte", StrToByte);
 | 
						|
		L.RegFunction("StrToShort", StrToShort);
 | 
						|
		L.RegFunction("StrToFloat", StrToFloat);
 | 
						|
		L.EndStaticLibs();
 | 
						|
	}
 | 
						|
 | 
						|
	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
 | 
						|
	static int ObjToString(IntPtr L)
 | 
						|
	{
 | 
						|
		try
 | 
						|
		{
 | 
						|
			ToLua.CheckArgsCount(L, 1);
 | 
						|
			object arg0 = ToLua.ToVarObject(L, 1);
 | 
						|
			string o = ConvertUtil.ObjToString(arg0);
 | 
						|
			LuaDLL.lua_pushstring(L, o);
 | 
						|
			return 1;
 | 
						|
		}
 | 
						|
		catch (Exception e)
 | 
						|
		{
 | 
						|
			return LuaDLL.toluaL_exception(L, e);
 | 
						|
		}
 | 
						|
	}
 | 
						|
 | 
						|
	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
 | 
						|
	static int ObjToUpdateProgress(IntPtr L)
 | 
						|
	{
 | 
						|
		try
 | 
						|
		{
 | 
						|
			ToLua.CheckArgsCount(L, 1);
 | 
						|
			object arg0 = ToLua.ToVarObject(L, 1);
 | 
						|
			ResUpdate.ResUpdateProgress o = ConvertUtil.ObjToUpdateProgress(arg0);
 | 
						|
			ToLua.PushObject(L, o);
 | 
						|
			return 1;
 | 
						|
		}
 | 
						|
		catch (Exception e)
 | 
						|
		{
 | 
						|
			return LuaDLL.toluaL_exception(L, e);
 | 
						|
		}
 | 
						|
	}
 | 
						|
 | 
						|
	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
 | 
						|
	static int ObjToFloat(IntPtr L)
 | 
						|
	{
 | 
						|
		try
 | 
						|
		{
 | 
						|
			ToLua.CheckArgsCount(L, 1);
 | 
						|
			object arg0 = ToLua.ToVarObject(L, 1);
 | 
						|
			float o = ConvertUtil.ObjToFloat(arg0);
 | 
						|
			LuaDLL.lua_pushnumber(L, o);
 | 
						|
			return 1;
 | 
						|
		}
 | 
						|
		catch (Exception e)
 | 
						|
		{
 | 
						|
			return LuaDLL.toluaL_exception(L, e);
 | 
						|
		}
 | 
						|
	}
 | 
						|
 | 
						|
	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
 | 
						|
	static int ObjToInt(IntPtr L)
 | 
						|
	{
 | 
						|
		try
 | 
						|
		{
 | 
						|
			ToLua.CheckArgsCount(L, 1);
 | 
						|
			object arg0 = ToLua.ToVarObject(L, 1);
 | 
						|
			int o = ConvertUtil.ObjToInt(arg0);
 | 
						|
			LuaDLL.lua_pushinteger(L, o);
 | 
						|
			return 1;
 | 
						|
		}
 | 
						|
		catch (Exception e)
 | 
						|
		{
 | 
						|
			return LuaDLL.toluaL_exception(L, e);
 | 
						|
		}
 | 
						|
	}
 | 
						|
 | 
						|
	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
 | 
						|
	static int StrToLong(IntPtr L)
 | 
						|
	{
 | 
						|
		try
 | 
						|
		{
 | 
						|
			ToLua.CheckArgsCount(L, 1);
 | 
						|
			string arg0 = ToLua.CheckString(L, 1);
 | 
						|
			long o = ConvertUtil.StrToLong(arg0);
 | 
						|
			LuaDLL.tolua_pushint64(L, o);
 | 
						|
			return 1;
 | 
						|
		}
 | 
						|
		catch (Exception e)
 | 
						|
		{
 | 
						|
			return LuaDLL.toluaL_exception(L, e);
 | 
						|
		}
 | 
						|
	}
 | 
						|
 | 
						|
	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
 | 
						|
	static int StrToInt(IntPtr L)
 | 
						|
	{
 | 
						|
		try
 | 
						|
		{
 | 
						|
			ToLua.CheckArgsCount(L, 1);
 | 
						|
			string arg0 = ToLua.CheckString(L, 1);
 | 
						|
			int o = ConvertUtil.StrToInt(arg0);
 | 
						|
			LuaDLL.lua_pushinteger(L, o);
 | 
						|
			return 1;
 | 
						|
		}
 | 
						|
		catch (Exception e)
 | 
						|
		{
 | 
						|
			return LuaDLL.toluaL_exception(L, e);
 | 
						|
		}
 | 
						|
	}
 | 
						|
 | 
						|
	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
 | 
						|
	static int StrToByte(IntPtr L)
 | 
						|
	{
 | 
						|
		try
 | 
						|
		{
 | 
						|
			ToLua.CheckArgsCount(L, 1);
 | 
						|
			string arg0 = ToLua.CheckString(L, 1);
 | 
						|
			byte o = ConvertUtil.StrToByte(arg0);
 | 
						|
			LuaDLL.lua_pushnumber(L, o);
 | 
						|
			return 1;
 | 
						|
		}
 | 
						|
		catch (Exception e)
 | 
						|
		{
 | 
						|
			return LuaDLL.toluaL_exception(L, e);
 | 
						|
		}
 | 
						|
	}
 | 
						|
 | 
						|
	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
 | 
						|
	static int StrToShort(IntPtr L)
 | 
						|
	{
 | 
						|
		try
 | 
						|
		{
 | 
						|
			ToLua.CheckArgsCount(L, 1);
 | 
						|
			string arg0 = ToLua.CheckString(L, 1);
 | 
						|
			short o = ConvertUtil.StrToShort(arg0);
 | 
						|
			LuaDLL.lua_pushnumber(L, o);
 | 
						|
			return 1;
 | 
						|
		}
 | 
						|
		catch (Exception e)
 | 
						|
		{
 | 
						|
			return LuaDLL.toluaL_exception(L, e);
 | 
						|
		}
 | 
						|
	}
 | 
						|
 | 
						|
	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
 | 
						|
	static int StrToFloat(IntPtr L)
 | 
						|
	{
 | 
						|
		try
 | 
						|
		{
 | 
						|
			ToLua.CheckArgsCount(L, 1);
 | 
						|
			string arg0 = ToLua.CheckString(L, 1);
 | 
						|
			float o = ConvertUtil.StrToFloat(arg0);
 | 
						|
			LuaDLL.lua_pushnumber(L, o);
 | 
						|
			return 1;
 | 
						|
		}
 | 
						|
		catch (Exception e)
 | 
						|
		{
 | 
						|
			return LuaDLL.toluaL_exception(L, e);
 | 
						|
		}
 | 
						|
	}
 | 
						|
}
 | 
						|
 |