LuaExpression::SetFromExpression -> LuaReference::SetFromExpression
This commit is contained in:
@@ -138,7 +138,7 @@ void LuaReference::Unregister()
|
|||||||
m_iReference = LUA_NOREF;
|
m_iReference = LUA_NOREF;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LuaExpression::SetFromExpression( const RString &sExpression )
|
void LuaReference::SetFromExpression( const RString &sExpression )
|
||||||
{
|
{
|
||||||
RString sFullExpression = "return " + sExpression;
|
RString sFullExpression = "return " + sExpression;
|
||||||
SetName( sFullExpression );
|
SetName( sFullExpression );
|
||||||
|
|||||||
@@ -21,6 +21,10 @@ public:
|
|||||||
void SetFromStack( Lua *L );
|
void SetFromStack( Lua *L );
|
||||||
void SetFromNil();
|
void SetFromNil();
|
||||||
|
|
||||||
|
/* Evaluate an expression that returns an object; store the object in a reference.
|
||||||
|
* For example, evaluating "{ 1, 2, 3 }" will result in a reference to a table. */
|
||||||
|
void SetFromExpression( const RString &sExpression );
|
||||||
|
|
||||||
/* Deep-copy tables, detaching this reference from any others. */
|
/* Deep-copy tables, detaching this reference from any others. */
|
||||||
void DeepCopy();
|
void DeepCopy();
|
||||||
|
|
||||||
@@ -48,13 +52,9 @@ private:
|
|||||||
RString m_sName;
|
RString m_sName;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Evaluate an expression that returns an object; store the object in a reference.
|
|
||||||
* For example, evaluating "{ 1, 2, 3 }" will result in a reference to a table. */
|
|
||||||
class LuaExpression: public LuaReference
|
class LuaExpression: public LuaReference
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LuaExpression( const RString &sExpression = "" ) { if( sExpression != "" ) SetFromExpression( sExpression ); }
|
|
||||||
void SetFromExpression( const RString &sExpression );
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class LuaTable: public LuaReference
|
class LuaTable: public LuaReference
|
||||||
|
|||||||
Reference in New Issue
Block a user