Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
l_areastore.h
Go to the documentation of this file.
1// Luanti
2// SPDX-License-Identifier: LGPL-2.1-or-later
3// Copyright (C) 2015 est31 <mtest31@outlook.com>
4
5#pragma once
6
7#include "lua_api/l_base.h"
8
9class AreaStore;
10
12{
13private:
14 static const luaL_Reg methods[];
15
16 static int gc_object(lua_State *L);
17
18 static int l_get_area(lua_State *L);
19
20 static int l_get_areas_for_pos(lua_State *L);
21 static int l_get_areas_in_area(lua_State *L);
22 static int l_insert_area(lua_State *L);
23 static int l_reserve(lua_State *L);
24 static int l_remove_area(lua_State *L);
25
26 static int l_set_cache_params(lua_State *L);
27
28 static int l_to_string(lua_State *L);
29 static int l_to_file(lua_State *L);
30
31 static int l_from_string(lua_State *L);
32 static int l_from_file(lua_State *L);
33
34public:
35 AreaStore *as = nullptr;
36
38 LuaAreaStore(const std::string &type);
40
41 // AreaStore()
42 // Creates an AreaStore and leaves it on top of stack
43 static int create_object(lua_State *L);
44
45 static void Register(lua_State *L);
46
47 static const char className[];
48};
Definition areastore.h:39
Definition l_areastore.h:12
static const char className[]
Definition l_areastore.h:47
static int l_from_string(lua_State *L)
Definition l_areastore.cpp:263
static int gc_object(lua_State *L)
Definition l_areastore.cpp:75
static int l_get_areas_for_pos(lua_State *L)
Definition l_areastore.cpp:108
LuaAreaStore()
Definition l_areastore.cpp:290
static int l_reserve(lua_State *L)
Definition l_areastore.cpp:183
static int l_get_areas_in_area(lua_State *L)
Definition l_areastore.cpp:130
static int create_object(lua_State *L)
Definition l_areastore.cpp:313
static const luaL_Reg methods[]
Definition l_areastore.h:340
static int l_get_area(lua_State *L)
Definition l_areastore.cpp:83
static int l_to_file(lua_State *L)
Definition l_areastore.cpp:245
~LuaAreaStore()
Definition l_areastore.cpp:306
static int l_to_string(lua_State *L)
Definition l_areastore.cpp:230
AreaStore * as
Definition l_areastore.h:35
static int l_remove_area(lua_State *L)
Definition l_areastore.cpp:196
static int l_set_cache_params(lua_State *L)
Definition l_areastore.cpp:211
static int l_insert_area(lua_State *L)
Definition l_areastore.cpp:157
static int l_from_file(lua_State *L)
Definition l_areastore.cpp:277
Definition l_base.h:28