merged AI doc, some new pages
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
//! \~russian \par Общее
|
||||
//!
|
||||
//! \~english
|
||||
//! These files provides execute Lua programs inside C++ code.
|
||||
//! These files provide execution of Lua programs inside C++ code.
|
||||
//!
|
||||
//! \~russian
|
||||
//! Эти файлы обеспечивают возможность выполнения программ Lua внутри C++ кода.
|
||||
@@ -64,10 +64,18 @@
|
||||
|
||||
namespace luabridge {
|
||||
|
||||
//! \~\ingroup Lua
|
||||
//! \~\brief
|
||||
//! \~english LuaBridge stack adapter for %PIString.
|
||||
//! \~russian Адаптер стека LuaBridge для %PIString.
|
||||
template<>
|
||||
struct Stack<PIString> {
|
||||
//! \~english Pushes a UTF-8 representation of the string onto the Lua stack.
|
||||
//! \~russian Помещает UTF-8 представление строки в стек Lua.
|
||||
static void push(lua_State * L, PIString const & str) { lua_pushstring(L, str.dataUTF8()); }
|
||||
|
||||
//! \~english Reads a Lua value as %PIString, converting non-string values through Lua.
|
||||
//! \~russian Читает значение Lua как %PIString, при необходимости преобразуя нестроковые значения средствами Lua.
|
||||
static PIString get(lua_State * L, int index) {
|
||||
if (lua_type(L, index) == LUA_TSTRING) {
|
||||
const char * str = lua_tostring(L, index);
|
||||
@@ -81,6 +89,8 @@ struct Stack<PIString> {
|
||||
return string;
|
||||
}
|
||||
|
||||
//! \~english Returns whether the value at \a index is already a Lua string.
|
||||
//! \~russian Возвращает, является ли значение по \a index уже строкой Lua.
|
||||
static bool isInstance(lua_State * L, int index) { return lua_type(L, index) == LUA_TSTRING; }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user