remove unused stuff

simplify ActorCommands

I thought about getting rid of m_sLuaFunction; it's not needed
anymore, and takes up memory (probably more memory than the
function itself), but I use it a lot to identify floating
references when I don't know what I'm looking at.  Store it
generically in LuaReference.
This commit is contained in:
Glenn Maynard
2006-09-21 01:19:18 +00:00
parent 7d1f669e93
commit d3e50d80c8
4 changed files with 25 additions and 74 deletions
+5 -22
View File
@@ -35,19 +35,15 @@ public:
/* Return the referenced type, or LUA_TNONE if not set. */
int GetLuaType() const;
protected:
/* If this object needs to store state to recreate itself, overload this. */
virtual void BeforeReset() { }
/* If this object is able to recreate itself, overload this, and ReRegisterAll
* will work; the reference will still exist after a theme change. If not
* implemented, the reference will be unset after ReRegister. */
virtual void Register() { }
void SetName( const RString &sName );
RString GetName() const { return m_sName; }
private:
void Unregister();
void ReRegister();
int m_iReference;
/* This string can identify the reference. This is only used for debugging. */
RString m_sName;
};
/* Evaluate an expression that returns an object; store the object in a reference.
@@ -57,12 +53,6 @@ class LuaExpression: public LuaReference
public:
LuaExpression( const RString &sExpression = "" ) { if( sExpression != "" ) SetFromExpression( sExpression ); }
void SetFromExpression( const RString &sExpression );
protected:
virtual void Register();
private:
RString m_sExpression;
};
/* Reference a trivially restorable Lua object (any object that Serialize can handle).
@@ -72,13 +62,6 @@ class LuaData: public LuaReference
public:
virtual RString Serialize() const;
virtual void LoadFromString( const RString &s );
protected:
virtual void BeforeReset();
virtual void Register();
RString m_sSerializedData;
bool m_bWasSet;
};
class LuaTable: public LuaData