Minetest 5.9.0-dev
 
Loading...
Searching...
No Matches
l_areastore.h
Go to the documentation of this file.
1/*
2Minetest
3Copyright (C) 2015 est31 <mtest31@outlook.com>
4
5This program is free software; you can redistribute it and/or modify
6it under the terms of the GNU Lesser General Public License as published by
7the Free Software Foundation; either version 2.1 of the License, or
8(at your option) any later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU Lesser General Public License for more details.
14
15You should have received a copy of the GNU Lesser General Public License along
16with this program; if not, write to the Free Software Foundation, Inc.,
1751 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18*/
19
20#pragma once
21
22#include "lua_api/l_base.h"
23
24class AreaStore;
25
27{
28private:
29 static const luaL_Reg methods[];
30
31 static int gc_object(lua_State *L);
32
33 static int l_get_area(lua_State *L);
34
35 static int l_get_areas_for_pos(lua_State *L);
36 static int l_get_areas_in_area(lua_State *L);
37 static int l_insert_area(lua_State *L);
38 static int l_reserve(lua_State *L);
39 static int l_remove_area(lua_State *L);
40
41 static int l_set_cache_params(lua_State *L);
42
43 static int l_to_string(lua_State *L);
44 static int l_to_file(lua_State *L);
45
46 static int l_from_string(lua_State *L);
47 static int l_from_file(lua_State *L);
48
49public:
50 AreaStore *as = nullptr;
51
53 LuaAreaStore(const std::string &type);
55
56 // AreaStore()
57 // Creates an AreaStore and leaves it on top of stack
58 static int create_object(lua_State *L);
59
60 static void Register(lua_State *L);
61
62 static const char className[];
63};
Definition: areastore.h:54
Definition: l_areastore.h:27
static const char className[]
Definition: l_areastore.h:62
static int l_from_string(lua_State *L)
Definition: l_areastore.cpp:278
static int gc_object(lua_State *L)
Definition: l_areastore.cpp:90
static int l_get_areas_for_pos(lua_State *L)
Definition: l_areastore.cpp:123
LuaAreaStore()
Definition: l_areastore.cpp:305
static int l_reserve(lua_State *L)
Definition: l_areastore.cpp:198
static int l_get_areas_in_area(lua_State *L)
Definition: l_areastore.cpp:145
static int create_object(lua_State *L)
Definition: l_areastore.cpp:328
static const luaL_Reg methods[]
Definition: l_areastore.h:29
static int l_get_area(lua_State *L)
Definition: l_areastore.cpp:98
static int l_to_file(lua_State *L)
Definition: l_areastore.cpp:260
~LuaAreaStore()
Definition: l_areastore.cpp:321
static int l_to_string(lua_State *L)
Definition: l_areastore.cpp:245
AreaStore * as
Definition: l_areastore.h:50
static int l_remove_area(lua_State *L)
Definition: l_areastore.cpp:211
static int l_set_cache_params(lua_State *L)
Definition: l_areastore.cpp:226
static int l_insert_area(lua_State *L)
Definition: l_areastore.cpp:172
static int l_from_file(lua_State *L)
Definition: l_areastore.cpp:292
Definition: l_base.h:43