Import project/ code

This commit is contained in:
Joshua Granick
2013-11-25 23:32:25 -08:00
parent 5f258a833f
commit 9141d52836
313 changed files with 62693 additions and 0 deletions

24
project/include/Object.h Normal file
View File

@@ -0,0 +1,24 @@
#ifndef NME_OBJECT_H
#define NME_OBJECT_H
namespace nme
{
class Object
{
public:
Object(bool inInitialRef=0) : mRefCount(inInitialRef?1:0) { }
Object *IncRef() { mRefCount++; return this; }
void DecRef() { mRefCount--; if (mRefCount<=0) delete this; }
int GetRefCount() { return mRefCount; }
protected:
virtual ~Object() { }
int mRefCount;
};
} // end namespace nme
#endif