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... | |
static int | impl_gettext_tostr (lua_State *L) |
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_len (lua_State *L) |
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_dir (lua_State *L) |
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 356 of file lua_common.cpp.
|
static |
Creates a t_string object (__call metamethod).
Definition at line 64 of file lua_common.cpp.
References d, and luaW_pushtstring().
Referenced by register_gettext_metatable().
|
static |
Definition at line 79 of file lua_common.cpp.
References d, lua_push(), and s.
Referenced by register_gettext_metatable().
|
static |
Destroys a t_string object before it is collected (__gc metamethod).
Definition at line 157 of file lua_common.cpp.
References t.
Referenced by register_tstring_metatable().
|
static |
Appends a scalar to a t_string object (__concat metamethod).
Definition at line 134 of file lua_common.cpp.
References t, tstring_concat_aux(), and tstringKey.
Referenced by register_tstring_metatable().
|
static |
Definition at line 180 of file lua_common.cpp.
References translation::compare(), and t_string::get().
Referenced by register_tstring_metatable().
|
static |
Definition at line 172 of file lua_common.cpp.
References translation::compare(), t_string::get(), and tstringKey.
Referenced by register_tstring_metatable().
|
static |
Definition at line 147 of file lua_common.cpp.
References t.
Referenced by register_tstring_metatable().
|
static |
Definition at line 164 of file lua_common.cpp.
References translation::compare(), t_string::get(), and tstringKey.
Referenced by register_tstring_metatable().
|
static |
Converts a t_string object to a string (__tostring metamethod); that is, performs a translation.
Definition at line 192 of file lua_common.cpp.
References t.
Referenced by register_tstring_metatable().
|
static |
Destroys a vconfig object before it is collected (__gc metamethod).
Definition at line 293 of file lua_common.cpp.
References vconfig::~vconfig().
Referenced by register_vconfig_metatable().
|
static |
Definition at line 268 of file lua_common.cpp.
References config::attribute_range(), vconfig::get_config(), and lua_push().
Referenced by register_vconfig_metatable().
|
static |
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 204 of file lua_common.cpp.
References config::attribute_range(), vconfig::expand(), vconfig::get_config(), vconfig::get_parsed_config(), vconfig::has_attribute(), i, luaW_push_namedtuple(), luaW_pushconfig(), luaW_pushscalar(), luaW_pushvconfig(), vconfig::null(), vconfig::ordered_begin(), and vconfig::ordered_end().
Referenced by register_vconfig_metatable().
|
static |
Construct an iterator to iterate through the subtags of a vconfig.
Definition at line 394 of file lua_common.cpp.
References impl_vconfig_ipairs_iter(), luaW_checkvconfig(), vconfig::ordered_begin(), vconfig::ordered_end(), and vconfigipairsKey.
Referenced by register_vconfig_metatable().
|
static |
Destroy a vconfig ipairs iterator.
Definition at line 383 of file lua_common.cpp.
References p.
Referenced by register_vconfig_metatable().
|
static |
Iterate through the subtags of a vconfig.
Definition at line 361 of file lua_common.cpp.
References i, luaW_checkvconfig(), luaW_pushvconfig(), p, and vconfigipairsKey.
Referenced by impl_vconfig_ipairs().
|
static |
Construct an iterator to iterate through the attributes of a vconfig.
Definition at line 345 of file lua_common.cpp.
References config::attribute_range(), vconfig::get_config(), impl_vconfig_pairs_iter(), luaW_checkvconfig(), and vconfigpairsKey.
Referenced by register_vconfig_metatable().
|
static |
Destroy a vconfig pairs iterator.
Definition at line 321 of file lua_common.cpp.
References p.
Referenced by register_vconfig_metatable().
|
static |
Iterate through the attributes of a vconfig.
Definition at line 303 of file lua_common.cpp.
References luaW_checkvconfig(), luaW_pushscalar(), p, and vconfigpairsKey.
Referenced by impl_vconfig_pairs().
|
static |
Returns the number of a child of a vconfig object.
Definition at line 282 of file lua_common.cpp.
References vconfig::null(), vconfig::ordered_begin(), and vconfig::ordered_end().
Referenced by register_vconfig_metatable().
int lua_common::intf_textdomain | ( | lua_State * | L | ) |
Creates an interface for gettext.
Definition at line 93 of file lua_common.cpp.
References gettextKey, and p.
Referenced by lua_kernel_base::lua_kernel_base().
int lua_common::intf_tovconfig | ( | lua_State * | L | ) |
Creates a vconfig containing the WML table.
Definition at line 411 of file lua_common.cpp.
References luaW_checkvconfig(), and luaW_pushvconfig().
Referenced by game_lua_kernel::game_lua_kernel(), and mapgen_lua_kernel::mapgen_lua_kernel().
std::string lua_common::register_gettext_metatable | ( | lua_State * | L | ) |
Adds the gettext metatable.
Definition at line 421 of file lua_common.cpp.
References gettextKey, impl_gettext(), and impl_gettext_tostr().
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 441 of file lua_common.cpp.
References impl_tstring_collect(), impl_tstring_concat(), impl_tstring_eq(), impl_tstring_le(), impl_tstring_len(), impl_tstring_lt(), impl_tstring_tostring(), luaW_getglobal(), 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 473 of file lua_common.cpp.
References impl_vconfig_collect(), impl_vconfig_dir(), impl_vconfig_get(), impl_vconfig_ipairs(), impl_vconfig_ipairs_collect(), impl_vconfig_pairs(), impl_vconfig_pairs_collect(), impl_vconfig_size(), vconfigipairsKey, vconfigKey, and vconfigpairsKey.
Referenced by game_lua_kernel::game_lua_kernel().
|
static |
Converts a Lua value at position src and appends it to dst.
Definition at line 112 of file lua_common.cpp.
References dst, luaW_type_error(), src, and tstringKey.
Referenced by impl_tstring_concat().