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

409 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 UnityEngineCacheWrap
{
public static void __Register(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
System.Type type = typeof(UnityEngine.Cache);
Utils.BeginObjectRegister(type, L, translator, 1, 3, 9, 2);
Utils.RegisterFunc(L, Utils.OBJ_META_IDX, "__eq", __EqMeta);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetHashCode", _m_GetHashCode);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Equals", _m_Equals);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ClearCache", _m_ClearCache);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "valid", _g_get_valid);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "ready", _g_get_ready);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "readOnly", _g_get_readOnly);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "path", _g_get_path);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "index", _g_get_index);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "spaceFree", _g_get_spaceFree);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "maximumAvailableStorageSpace", _g_get_maximumAvailableStorageSpace);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "spaceOccupied", _g_get_spaceOccupied);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "expirationDelay", _g_get_expirationDelay);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "maximumAvailableStorageSpace", _s_set_maximumAvailableStorageSpace);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "expirationDelay", _s_set_expirationDelay);
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)
{
translator.Push(L, default(UnityEngine.Cache));
return 1;
}
}
catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Cache constructor!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int __EqMeta(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
if (translator.Assignable<UnityEngine.Cache>(L, 1) && translator.Assignable<UnityEngine.Cache>(L, 2))
{
UnityEngine.Cache leftside;translator.Get(L, 1, out leftside);
UnityEngine.Cache rightside;translator.Get(L, 2, out rightside);
LuaAPI.lua_pushboolean(L, leftside == rightside);
return 1;
}
}
catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return LuaAPI.luaL_error(L, "invalid arguments to right hand of == operator, need UnityEngine.Cache!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_GetHashCode(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.Cache gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
{
var gen_ret = gen_to_be_invoked.GetHashCode( );
LuaAPI.xlua_pushinteger(L, gen_ret);
translator.Update(L, 1, gen_to_be_invoked);
return 1;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_Equals(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.Cache gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
int gen_param_count = LuaAPI.lua_gettop(L);
if(gen_param_count == 2&& translator.Assignable<object>(L, 2))
{
object _other = translator.GetObject(L, 2, typeof(object));
var gen_ret = gen_to_be_invoked.Equals( _other );
LuaAPI.lua_pushboolean(L, gen_ret);
translator.Update(L, 1, gen_to_be_invoked);
return 1;
}
if(gen_param_count == 2&& translator.Assignable<UnityEngine.Cache>(L, 2))
{
UnityEngine.Cache _other;translator.Get(L, 2, out _other);
var gen_ret = gen_to_be_invoked.Equals( _other );
LuaAPI.lua_pushboolean(L, gen_ret);
translator.Update(L, 1, gen_to_be_invoked);
return 1;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Cache.Equals!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_ClearCache(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.Cache gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
int gen_param_count = LuaAPI.lua_gettop(L);
if(gen_param_count == 1)
{
var gen_ret = gen_to_be_invoked.ClearCache( );
LuaAPI.lua_pushboolean(L, gen_ret);
translator.Update(L, 1, gen_to_be_invoked);
return 1;
}
if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
{
int _expiration = LuaAPI.xlua_tointeger(L, 2);
var gen_ret = gen_to_be_invoked.ClearCache( _expiration );
LuaAPI.lua_pushboolean(L, gen_ret);
translator.Update(L, 1, gen_to_be_invoked);
return 1;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Cache.ClearCache!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_valid(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.Cache gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.valid);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_ready(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.Cache gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.ready);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_readOnly(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.Cache gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.readOnly);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_path(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.Cache gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
LuaAPI.lua_pushstring(L, gen_to_be_invoked.path);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_index(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.Cache gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.index);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_spaceFree(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.Cache gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
LuaAPI.lua_pushint64(L, gen_to_be_invoked.spaceFree);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_maximumAvailableStorageSpace(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.Cache gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
LuaAPI.lua_pushint64(L, gen_to_be_invoked.maximumAvailableStorageSpace);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_spaceOccupied(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.Cache gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
LuaAPI.lua_pushint64(L, gen_to_be_invoked.spaceOccupied);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_expirationDelay(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.Cache gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.expirationDelay);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_maximumAvailableStorageSpace(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.Cache gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
gen_to_be_invoked.maximumAvailableStorageSpace = LuaAPI.lua_toint64(L, 2);
translator.Update(L, 1, gen_to_be_invoked);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_expirationDelay(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UnityEngine.Cache gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
gen_to_be_invoked.expirationDelay = LuaAPI.xlua_tointeger(L, 2);
translator.Update(L, 1, gen_to_be_invoked);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
}
}