some refactoring

This commit is contained in:
Eduardo Bart
2011-07-16 21:13:53 -03:00
parent 8ef1b28546
commit 571801ae39
70 changed files with 430 additions and 1654 deletions

View File

@@ -0,0 +1,26 @@
#ifndef SCRIPTOBJECT_H
#define SCRIPTOBJECT_H
#include <global.h>
class ScriptObject : public boost::enable_shared_from_this<ScriptObject>
{
public:
ScriptObject() : m_scriptTableRef(-1) { }
virtual ~ScriptObject() { releaseScriptObject(); }
void releaseScriptObject();
//TODO: global destroy
virtual const char *getScriptObjectType() const { return NULL; }
int getScriptTable();
void callScriptTableField(const std::string& field, int numArgs = 0);
private:
int m_scriptTableRef;
};
typedef boost::shared_ptr<ScriptObject> ScriptObjectPtr;
#endif // SCRIPTOBJECT_H