LuaExpression::SetFromExpression -> LuaReference::SetFromExpression

This commit is contained in:
Glenn Maynard
2006-09-21 02:06:42 +00:00
parent 0012857bfd
commit fc510e7086
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -138,7 +138,7 @@ void LuaReference::Unregister()
m_iReference = LUA_NOREF;
}
void LuaExpression::SetFromExpression( const RString &sExpression )
void LuaReference::SetFromExpression( const RString &sExpression )
{
RString sFullExpression = "return " + sExpression;
SetName( sFullExpression );
+4 -4
View File
@@ -21,6 +21,10 @@ public:
void SetFromStack( Lua *L );
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. */
void DeepCopy();
@@ -48,13 +52,9 @@ private:
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
{
public:
LuaExpression( const RString &sExpression = "" ) { if( sExpression != "" ) SetFromExpression( sExpression ); }
void SetFromExpression( const RString &sExpression );
};
class LuaTable: public LuaReference