393 lines
14 KiB
C#
393 lines
14 KiB
C#
#if USE_UNI_LUA
|
|
using LuaAPI = UniLua.Lua;
|
|
using RealStatePtr = UniLua.ILuaState;
|
|
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
#else
|
|
using LuaAPI = XLua.LuaDLL.Lua;
|
|
using RealStatePtr = System.IntPtr;
|
|
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
#endif
|
|
|
|
using XLua;
|
|
using System.Collections.Generic;
|
|
|
|
|
|
namespace XLua.CSObjectWrap
|
|
{
|
|
using Utils = XLua.Utils;
|
|
public class BFCombineURLWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(BF.CombineURL);
|
|
Utils.BeginObjectRegister(type, L, translator, 0, 1, 9, 9);
|
|
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ToString", _m_ToString);
|
|
|
|
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "cluster_type", _g_get_cluster_type);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "ugate_addr", _g_get_ugate_addr);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "vsn_addr", _g_get_vsn_addr);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "upay_addr", _g_get_upay_addr);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "uchat_addr", _g_get_uchat_addr);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "community_web_addr", _g_get_community_web_addr);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "community_srv_addr", _g_get_community_srv_addr);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "aics_http_addr", _g_get_aics_http_addr);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "aics_ws_addr", _g_get_aics_ws_addr);
|
|
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "cluster_type", _s_set_cluster_type);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "ugate_addr", _s_set_ugate_addr);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "vsn_addr", _s_set_vsn_addr);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "upay_addr", _s_set_upay_addr);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "uchat_addr", _s_set_uchat_addr);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "community_web_addr", _s_set_community_web_addr);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "community_srv_addr", _s_set_community_srv_addr);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "aics_http_addr", _s_set_aics_http_addr);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "aics_ws_addr", _s_set_aics_ws_addr);
|
|
|
|
|
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
null, null, null);
|
|
|
|
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Utils.EndClassRegister(type, L, translator);
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int __CreateInstance(RealStatePtr L)
|
|
{
|
|
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
if(LuaAPI.lua_gettop(L) == 1)
|
|
{
|
|
|
|
var gen_ret = new BF.CombineURL();
|
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
|
}
|
|
|
|
}
|
|
catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to BF.CombineURL constructor!");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_ToString(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.CombineURL gen_to_be_invoked = (BF.CombineURL)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.ToString( );
|
|
LuaAPI.lua_pushstring(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_cluster_type(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.CombineURL gen_to_be_invoked = (BF.CombineURL)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.cluster_type);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_ugate_addr(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.CombineURL gen_to_be_invoked = (BF.CombineURL)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.ugate_addr);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_vsn_addr(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.CombineURL gen_to_be_invoked = (BF.CombineURL)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.vsn_addr);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_upay_addr(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.CombineURL gen_to_be_invoked = (BF.CombineURL)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.upay_addr);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_uchat_addr(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.CombineURL gen_to_be_invoked = (BF.CombineURL)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.uchat_addr);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_community_web_addr(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.CombineURL gen_to_be_invoked = (BF.CombineURL)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.community_web_addr);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_community_srv_addr(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.CombineURL gen_to_be_invoked = (BF.CombineURL)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.community_srv_addr);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_aics_http_addr(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.CombineURL gen_to_be_invoked = (BF.CombineURL)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.aics_http_addr);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_aics_ws_addr(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.CombineURL gen_to_be_invoked = (BF.CombineURL)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.aics_ws_addr);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_cluster_type(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.CombineURL gen_to_be_invoked = (BF.CombineURL)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.cluster_type = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_ugate_addr(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.CombineURL gen_to_be_invoked = (BF.CombineURL)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.ugate_addr = LuaAPI.lua_tostring(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_vsn_addr(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.CombineURL gen_to_be_invoked = (BF.CombineURL)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.vsn_addr = LuaAPI.lua_tostring(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_upay_addr(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.CombineURL gen_to_be_invoked = (BF.CombineURL)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.upay_addr = LuaAPI.lua_tostring(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_uchat_addr(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.CombineURL gen_to_be_invoked = (BF.CombineURL)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.uchat_addr = LuaAPI.lua_tostring(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_community_web_addr(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.CombineURL gen_to_be_invoked = (BF.CombineURL)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.community_web_addr = LuaAPI.lua_tostring(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_community_srv_addr(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.CombineURL gen_to_be_invoked = (BF.CombineURL)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.community_srv_addr = LuaAPI.lua_tostring(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_aics_http_addr(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.CombineURL gen_to_be_invoked = (BF.CombineURL)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.aics_http_addr = LuaAPI.lua_tostring(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_aics_ws_addr(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.CombineURL gen_to_be_invoked = (BF.CombineURL)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.aics_ws_addr = LuaAPI.lua_tostring(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|