Typedefs | |
typedef std::pair < vconfig::all_children_iterator, vconfig::all_children_iterator > | vconfig_child_range |
Functions | |
static int | impl_gettext (lua_State *L) |
Creates a t_string object (__call metamethod). More... | |
int | intf_textdomain (lua_State *L) |
Creates an interface for gettext. More... | |
static void | tstring_concat_aux (lua_State *L, t_string &dst, int src) |
Converts a Lua value at position src and appends it to dst. More... | |
static int | impl_tstring_concat (lua_State *L) |
Appends a scalar to a t_string object (__concat metamethod). More... | |
static int | impl_tstring_collect (lua_State *L) |
Destroys a t_string object before it is collected (__gc metamethod). More... | |
static int | impl_tstring_lt (lua_State *L) |
static int | impl_tstring_le (lua_State *L) |
static int | impl_tstring_eq (lua_State *L) |
static int | impl_tstring_tostring (lua_State *L) |
Converts a t_string object to a string (__tostring metamethod); that is, performs a translation. More... | |
static int | impl_vconfig_get (lua_State *L) |
Gets the parsed field of a vconfig object (_index metamethod). More... | |
static int | impl_vconfig_size (lua_State *L) |
Returns the number of a child of a vconfig object. More... | |
static int | impl_vconfig_collect (lua_State *L) |
Destroys a vconfig object before it is collected (__gc metamethod). More... | |
static int | impl_vconfig_pairs_iter (lua_State *L) |
Iterate through the attributes of a vconfig. More... | |
static int | impl_vconfig_pairs_collect (lua_State *L) |
Destroy a vconfig pairs iterator. More... | |
static int | impl_vconfig_pairs (lua_State *L) |
Construct an iterator to iterate through the attributes of a vconfig. More... | |
static int | impl_vconfig_ipairs_iter (lua_State *L) |
Iterate through the subtags of a vconfig. More... | |
static int | impl_vconfig_ipairs_collect (lua_State *L) |
Destroy a vconfig ipairs iterator. More... | |
static int | impl_vconfig_ipairs (lua_State *L) |
Construct an iterator to iterate through the subtags of a vconfig. More... | |
int | intf_tovconfig (lua_State *L) |
Creates a vconfig containing the WML table. More... | |
std::string | register_gettext_metatable (lua_State *L) |
Adds the gettext metatable. More... | |
std::string | register_tstring_metatable (lua_State *L) |
Adds the tstring metatable. More... | |
std::string | register_vconfig_metatable (lua_State *L) |
Adds the vconfig metatable. More... | |
typedef std::pair<vconfig::all_children_iterator, vconfig::all_children_iterator> lua_common::vconfig_child_range |
Definition at line 310 of file lua_common.cpp.
Creates a t_string object (__call metamethod).
Definition at line 63 of file lua_common.cpp.
References d, lua_touserdata(), luaL_checkstring, and luaW_pushtstring().
Referenced by register_gettext_metatable().
Destroys a t_string object before it is collected (__gc metamethod).
Definition at line 134 of file lua_common.cpp.
References lua_touserdata().
Referenced by register_tstring_metatable().
Appends a scalar to a t_string object (__concat metamethod).
Definition at line 118 of file lua_common.cpp.
References lua_newuserdata(), luaL_setmetatable(), tstring_concat_aux(), and tstringKey.
Referenced by register_tstring_metatable().
Definition at line 157 of file lua_common.cpp.
References translation::compare(), t_string::get(), lua_pushboolean(), and lua_touserdata().
Referenced by register_tstring_metatable().
Definition at line 149 of file lua_common.cpp.
References translation::compare(), t_string::get(), lua_pushboolean(), and lua_touserdata().
Referenced by register_tstring_metatable().
Definition at line 141 of file lua_common.cpp.
References translation::compare(), t_string::get(), lua_pushboolean(), and lua_touserdata().
Referenced by register_tstring_metatable().
Converts a t_string object to a string (__tostring metamethod); that is, performs a translation.
Definition at line 169 of file lua_common.cpp.
References t_string::c_str(), lua_pushstring(), and lua_touserdata().
Referenced by register_tstring_metatable().
Destroys a vconfig object before it is collected (__gc metamethod).
Definition at line 259 of file lua_common.cpp.
References lua_touserdata(), and vconfig::~vconfig().
Referenced by register_vconfig_metatable().
Gets the parsed field of a vconfig object (_index metamethod).
Special fields __literal, __shallow_literal, __parsed, and __shallow_parsed, return Lua tables.
Definition at line 181 of file lua_common.cpp.
References config::attribute_range(), vconfig::all_children_iterator::disable_insertion(), vconfig::expand(), vconfig::all_children_iterator::get_child(), vconfig::get_config(), vconfig::all_children_iterator::get_key(), vconfig::get_parsed_config(), vconfig::has_attribute(), i, lua_createtable(), lua_isnumber(), lua_newtable, lua_pushstring(), lua_rawseti(), lua_setfield(), lua_tointeger, lua_touserdata(), luaL_checkstring, luaW_pushconfig(), luaW_pushscalar(), luaW_pushvconfig(), vconfig::null(), vconfig::ordered_begin(), vconfig::ordered_end(), and pos.
Referenced by register_vconfig_metatable().
Construct an iterator to iterate through the subtags of a vconfig.
Definition at line 348 of file lua_common.cpp.
References impl_vconfig_ipairs_iter(), lua_newuserdata(), lua_pushcclosure(), lua_pushinteger(), lua_pushvalue(), lua_setmetatable(), luaL_newmetatable(), luaW_checkvconfig(), vconfig::ordered_begin(), vconfig::ordered_end(), and vconfigipairsKey.
Referenced by register_vconfig_metatable().
Destroy a vconfig ipairs iterator.
Definition at line 337 of file lua_common.cpp.
References lua_touserdata().
Referenced by register_vconfig_metatable().
Iterate through the subtags of a vconfig.
Definition at line 315 of file lua_common.cpp.
References i, lua_createtable(), lua_pushinteger(), lua_pushlstring(), lua_rawseti(), lua_upvalueindex, luaL_checkinteger(), luaL_checkudata(), luaW_checkvconfig(), luaW_pushvconfig(), and vconfigipairsKey.
Referenced by impl_vconfig_ipairs().
Construct an iterator to iterate through the attributes of a vconfig.
Definition at line 298 of file lua_common.cpp.
References config::attribute_range(), vconfig::get_config(), impl_vconfig_pairs_iter(), lua_newuserdata(), lua_pushcclosure(), lua_pushvalue(), lua_setmetatable(), luaL_newmetatable(), luaW_checkvconfig(), and vconfigpairsKey.
Referenced by register_vconfig_metatable().
Destroy a vconfig pairs iterator.
Definition at line 286 of file lua_common.cpp.
References lua_touserdata().
Referenced by register_vconfig_metatable().
Iterate through the attributes of a vconfig.
Definition at line 269 of file lua_common.cpp.
References lua_pushlstring(), lua_upvalueindex, luaL_checkudata(), luaW_checkvconfig(), luaW_pushscalar(), and vconfigpairsKey.
Referenced by impl_vconfig_pairs().
Returns the number of a child of a vconfig object.
Definition at line 248 of file lua_common.cpp.
References lua_pushinteger(), lua_touserdata(), vconfig::null(), vconfig::ordered_begin(), and vconfig::ordered_end().
Referenced by register_vconfig_metatable().
Creates an interface for gettext.
Definition at line 77 of file lua_common.cpp.
References gettextKey, lua_newuserdata(), luaL_checklstring(), and luaL_setmetatable().
Referenced by lua_kernel_base::lua_kernel_base().
Creates a vconfig containing the WML table.
Definition at line 366 of file lua_common.cpp.
References luaW_checkvconfig(), and luaW_pushvconfig().
Referenced by lua_kernel_base::lua_kernel_base().
std::string lua_common::register_gettext_metatable | ( | lua_State * | L | ) |
Adds the gettext metatable.
Definition at line 376 of file lua_common.cpp.
References gettextKey, impl_gettext(), lua_pushstring(), lua_setfield(), luaL_newmetatable(), and luaL_setfuncs().
Referenced by lua_kernel_base::lua_kernel_base().
std::string lua_common::register_tstring_metatable | ( | lua_State * | L | ) |
Adds the tstring metatable.
Definition at line 395 of file lua_common.cpp.
References impl_tstring_collect(), impl_tstring_concat(), impl_tstring_eq(), impl_tstring_le(), impl_tstring_lt(), impl_tstring_tostring(), lua_pushstring(), lua_setfield(), luaL_newmetatable(), luaL_setfuncs(), and tstringKey.
Referenced by lua_kernel_base::lua_kernel_base().
std::string lua_common::register_vconfig_metatable | ( | lua_State * | L | ) |
Adds the vconfig metatable.
Definition at line 419 of file lua_common.cpp.
References impl_vconfig_collect(), impl_vconfig_get(), impl_vconfig_ipairs(), impl_vconfig_ipairs_collect(), impl_vconfig_pairs(), impl_vconfig_pairs_collect(), impl_vconfig_size(), lua_pushcfunction, lua_pushstring(), lua_rawset(), lua_setfield(), luaL_newmetatable(), luaL_setfuncs(), vconfigipairsKey, vconfigKey, and vconfigpairsKey.
Referenced by game_lua_kernel::game_lua_kernel().
Converts a Lua value at position src and appends it to dst.
Definition at line 96 of file lua_common.cpp.
References LUA_TNUMBER, lua_tostring, LUA_TSTRING, LUA_TUSERDATA, lua_type(), luaL_testudata(), luaL_typerror(), and tstringKey.
Referenced by impl_tstring_concat().