add LuaReference::GetLuaType, LuaExpression
This commit is contained in:
@@ -66,6 +66,14 @@ bool LuaReference::IsSet() const
|
||||
return m_iReference != LUA_NOREF;
|
||||
}
|
||||
|
||||
int LuaReference::GetLuaType() const
|
||||
{
|
||||
this->PushSelf();
|
||||
int iRet = lua_type( LUA->L, -1 );
|
||||
lua_pop( LUA->L, 1 );
|
||||
return iRet;
|
||||
}
|
||||
|
||||
void LuaReference::Register()
|
||||
{
|
||||
}
|
||||
@@ -98,6 +106,20 @@ void LuaReference::ReRegister()
|
||||
}
|
||||
|
||||
|
||||
void LuaExpression::SetFromExpression( const CString &sExpression )
|
||||
{
|
||||
m_sExpression = sExpression;
|
||||
Register();
|
||||
}
|
||||
|
||||
void LuaExpression::Register()
|
||||
{
|
||||
LUA->RunScript( "return " + m_sExpression, 1 );
|
||||
|
||||
/* Store the result. */
|
||||
this->SetFromStack();
|
||||
}
|
||||
|
||||
/*
|
||||
* (c) 2005 Glenn Maynard, Chris Danford
|
||||
* All rights reserved.
|
||||
|
||||
Reference in New Issue
Block a user