The Battle for Wesnoth  1.15.1+dev
Namespaces | Functions
lua_team.hpp File Reference
#include <string>
Include dependency graph for lua_team.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 lua_team
 This namespace contains bindings for lua to hold a pointer to a team, and to access and modify it.
 

Functions

std::string lua_team::register_metatable (lua_State *L)
 
void luaW_pushteam (lua_State *, team &)
 Create a full userdata containing a pointer to the team. More...
 
teamluaW_toteam (lua_State *, int)
 Test if the top stack element is a team, and if so, return it. More...
 
teamluaW_checkteam (lua_State *, int)
 Test if the top stack element is a team, and if not, error. More...
 

Function Documentation

◆ luaW_checkteam()

team& luaW_checkteam ( lua_State ,
int   
)

Test if the top stack element is a team, and if not, error.

Definition at line 238 of file lua_team.cpp.

References luaL_checkudata(), and Team.

Referenced by impl_side_equal(), impl_side_get(), and impl_side_set().

◆ luaW_pushteam()

void luaW_pushteam ( lua_State ,
team  
)

Create a full userdata containing a pointer to the team.

Definition at line 231 of file lua_team.cpp.

References lua_newuserdata(), luaL_setmetatable(), t, and Team.

Referenced by game_lua_kernel::intf_get_sides().

◆ luaW_toteam()

team* luaW_toteam ( lua_State ,
int   
)

Test if the top stack element is a team, and if so, return it.

Definition at line 243 of file lua_team.cpp.

References luaL_testudata(), p, and Team.

Referenced by impl_side_equal(), and game_lua_kernel::intf_match_side().