c1_unity/Assets/XLua/Gen/BF_AssetBundleConfigCollectionWrap.cs
2023-04-03 11:04:31 +08:00

530 lines
18 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 BFAssetBundleConfigCollectionWrap
{
public static void __Register(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
System.Type type = typeof(BF.AssetBundleConfigCollection);
Utils.BeginObjectRegister(type, L, translator, 0, 8, 4, 4);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetConfigByBundlePath", _m_GetConfigByBundlePath);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetConfigByMainBundlePath", _m_GetConfigByMainBundlePath);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetConfigByAssetPath", _m_GetConfigByAssetPath);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetConfigByMd5", _m_GetConfigByMd5);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ToJson", _m_ToJson);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddAssetBundleConfig", _m_AddAssetBundleConfig);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddLangAssetBundleConfig", _m_AddLangAssetBundleConfig);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetLanguageConfigByName", _m_GetLanguageConfigByName);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "version", _g_get_version);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "mainConfigs", _g_get_mainConfigs);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "languageConfigs", _g_get_languageConfigs);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "allConfigs", _g_get_allConfigs);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "version", _s_set_version);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "mainConfigs", _s_set_mainConfigs);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "languageConfigs", _s_set_languageConfigs);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "allConfigs", _s_set_allConfigs);
Utils.EndObjectRegister(type, L, translator, null, null,
null, null, null);
Utils.BeginClassRegister(type, L, __CreateInstance, 4, 0, 0);
Utils.RegisterFunc(L, Utils.CLS_IDX, "Create", _m_Create_xlua_st_);
Utils.RegisterFunc(L, Utils.CLS_IDX, "Compress", _m_Compress_xlua_st_);
Utils.RegisterFunc(L, Utils.CLS_IDX, "Decompress", _m_Decompress_xlua_st_);
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.AssetBundleConfigCollection();
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.AssetBundleConfigCollection constructor!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_GetConfigByBundlePath(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.AssetBundleConfigCollection gen_to_be_invoked = (BF.AssetBundleConfigCollection)translator.FastGetCSObj(L, 1);
{
string _bundlePath = LuaAPI.lua_tostring(L, 2);
var gen_ret = gen_to_be_invoked.GetConfigByBundlePath( _bundlePath );
translator.Push(L, gen_ret);
return 1;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_GetConfigByMainBundlePath(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.AssetBundleConfigCollection gen_to_be_invoked = (BF.AssetBundleConfigCollection)translator.FastGetCSObj(L, 1);
{
string _bundlePath = LuaAPI.lua_tostring(L, 2);
var gen_ret = gen_to_be_invoked.GetConfigByMainBundlePath( _bundlePath );
translator.Push(L, gen_ret);
return 1;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_GetConfigByAssetPath(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.AssetBundleConfigCollection gen_to_be_invoked = (BF.AssetBundleConfigCollection)translator.FastGetCSObj(L, 1);
{
string _assetPath = LuaAPI.lua_tostring(L, 2);
var gen_ret = gen_to_be_invoked.GetConfigByAssetPath( _assetPath );
translator.Push(L, gen_ret);
return 1;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_GetConfigByMd5(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.AssetBundleConfigCollection gen_to_be_invoked = (BF.AssetBundleConfigCollection)translator.FastGetCSObj(L, 1);
{
string _md5 = LuaAPI.lua_tostring(L, 2);
var gen_ret = gen_to_be_invoked.GetConfigByMd5( _md5 );
translator.Push(L, gen_ret);
return 1;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_ToJson(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.AssetBundleConfigCollection gen_to_be_invoked = (BF.AssetBundleConfigCollection)translator.FastGetCSObj(L, 1);
{
var gen_ret = gen_to_be_invoked.ToJson( );
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 _m_AddAssetBundleConfig(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.AssetBundleConfigCollection gen_to_be_invoked = (BF.AssetBundleConfigCollection)translator.FastGetCSObj(L, 1);
{
BF.AssetBundleConfig _cfg = (BF.AssetBundleConfig)translator.GetObject(L, 2, typeof(BF.AssetBundleConfig));
gen_to_be_invoked.AddAssetBundleConfig( _cfg );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_AddLangAssetBundleConfig(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.AssetBundleConfigCollection gen_to_be_invoked = (BF.AssetBundleConfigCollection)translator.FastGetCSObj(L, 1);
{
string _languageName = LuaAPI.lua_tostring(L, 2);
BF.AssetBundleConfig _cfg = (BF.AssetBundleConfig)translator.GetObject(L, 3, typeof(BF.AssetBundleConfig));
gen_to_be_invoked.AddLangAssetBundleConfig( _languageName, _cfg );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_GetLanguageConfigByName(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.AssetBundleConfigCollection gen_to_be_invoked = (BF.AssetBundleConfigCollection)translator.FastGetCSObj(L, 1);
{
string _name = LuaAPI.lua_tostring(L, 2);
BF.LanguageConfig _languageConfig;
var gen_ret = gen_to_be_invoked.GetLanguageConfigByName( _name, out _languageConfig );
LuaAPI.lua_pushboolean(L, gen_ret);
translator.Push(L, _languageConfig);
return 2;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_Create_xlua_st_(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
{
string _json = LuaAPI.lua_tostring(L, 1);
var gen_ret = BF.AssetBundleConfigCollection.Create( _json );
translator.Push(L, gen_ret);
return 1;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_Compress_xlua_st_(RealStatePtr L)
{
try {
{
string _json = LuaAPI.lua_tostring(L, 1);
var gen_ret = BF.AssetBundleConfigCollection.Compress( _json );
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 _m_Decompress_xlua_st_(RealStatePtr L)
{
try {
{
byte[] _bytes = LuaAPI.lua_tobytes(L, 1);
var gen_ret = BF.AssetBundleConfigCollection.Decompress( _bytes );
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_version(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.AssetBundleConfigCollection gen_to_be_invoked = (BF.AssetBundleConfigCollection)translator.FastGetCSObj(L, 1);
LuaAPI.lua_pushstring(L, gen_to_be_invoked.version);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_mainConfigs(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.AssetBundleConfigCollection gen_to_be_invoked = (BF.AssetBundleConfigCollection)translator.FastGetCSObj(L, 1);
translator.Push(L, gen_to_be_invoked.mainConfigs);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_languageConfigs(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.AssetBundleConfigCollection gen_to_be_invoked = (BF.AssetBundleConfigCollection)translator.FastGetCSObj(L, 1);
translator.Push(L, gen_to_be_invoked.languageConfigs);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_allConfigs(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.AssetBundleConfigCollection gen_to_be_invoked = (BF.AssetBundleConfigCollection)translator.FastGetCSObj(L, 1);
translator.Push(L, gen_to_be_invoked.allConfigs);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_version(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.AssetBundleConfigCollection gen_to_be_invoked = (BF.AssetBundleConfigCollection)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.version = 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_mainConfigs(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.AssetBundleConfigCollection gen_to_be_invoked = (BF.AssetBundleConfigCollection)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.mainConfigs = (System.Collections.Generic.List<BF.AssetBundleConfig>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List<BF.AssetBundleConfig>));
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_languageConfigs(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.AssetBundleConfigCollection gen_to_be_invoked = (BF.AssetBundleConfigCollection)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.languageConfigs = (System.Collections.Generic.List<BF.LanguageConfig>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List<BF.LanguageConfig>));
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_allConfigs(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.AssetBundleConfigCollection gen_to_be_invoked = (BF.AssetBundleConfigCollection)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.allConfigs = (System.Collections.Generic.List<BF.AssetBundleConfig>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List<BF.AssetBundleConfig>));
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
}
}