The Battle for Wesnoth  1.15.1+dev
lua_team.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2014 - 2018 by Chris Beck <render787@gmail.com>
3  Part of the Battle for Wesnoth Project https://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 #pragma once
16 
17 class team;
18 struct lua_State;
19 
20 #include <string>
21 
22 /**
23  * This namespace contains bindings for lua to hold a pointer to a team,
24  * and to access and modify it.
25  */
26 namespace lua_team {
27  std::string register_metatable(lua_State *);
28 } //end namespace lua_team
29 
30 /// Create a full userdata containing a pointer to the team.
31 void luaW_pushteam(lua_State *, team &);
32 
33 /// Test if the top stack element is a team, and if so, return it
34 team* luaW_toteam(lua_State*, int);
35 
36 /// Test if the top stack element is a team, and if not, error
team * luaW_toteam(lua_State *, int)
Test if the top stack element is a team, and if so, return it.
Definition: lua_team.cpp:243
This namespace contains bindings for lua to hold a pointer to a team, and to access and modify it...
Definition: lua_team.cpp:207
std::string register_metatable(lua_State *L)
Definition: lua_team.cpp:209
This class stores all the data for a single &#39;side&#39; (in game nomenclature).
Definition: team.hpp:44
team & luaW_checkteam(lua_State *, int)
Test if the top stack element is a team, and if not, error.
Definition: lua_team.cpp:238
void luaW_pushteam(lua_State *, team &)
Create a full userdata containing a pointer to the team.
Definition: lua_team.cpp:231