mirror of https://github.com/axmolengine/axmol.git
issue #9
This commit is contained in:
parent
8a1220e32b
commit
d174b51106
|
@ -35,7 +35,7 @@ public:
|
||||||
|
|
||||||
UINT32 count(void);
|
UINT32 count(void);
|
||||||
UINT32 getIndexOfObject(NSObject *pObject);
|
UINT32 getIndexOfObject(NSObject *pObject);
|
||||||
BOOL containsObject(NSObject *pObject);
|
bool containsObject(NSObject *pObject);
|
||||||
NSObject* getLastObject(void);
|
NSObject* getLastObject(void);
|
||||||
|
|
||||||
// Adding objects
|
// Adding objects
|
||||||
|
|
|
@ -41,7 +41,7 @@ NSObject::NSObject(void)
|
||||||
|
|
||||||
// when the object is created, the refrence count of it is 1
|
// when the object is created, the refrence count of it is 1
|
||||||
m_uRefrence = 1;
|
m_uRefrence = 1;
|
||||||
m_bManaged = FALSE;
|
m_bManaged = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
NSObject::~NSObject(void)
|
NSObject::~NSObject(void)
|
||||||
|
@ -81,11 +81,11 @@ NSObject* NSObject::autorelease(void)
|
||||||
{
|
{
|
||||||
// todo add to pool manager
|
// todo add to pool manager
|
||||||
|
|
||||||
m_bManaged = TRUE;
|
m_bManaged = true;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL NSObject::isSingleRefrence(void)
|
bool NSObject::isSingleRefrence(void)
|
||||||
{
|
{
|
||||||
return m_uRefrence == 1;
|
return m_uRefrence == 1;
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ UINT32 NSObject::retainCount(void)
|
||||||
return m_uRefrence;
|
return m_uRefrence;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL NSObject::isEqual(const NSObject *pObject)
|
bool NSObject::isEqual(const NSObject *pObject)
|
||||||
{
|
{
|
||||||
return this == pObject;
|
return this == pObject;
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ protected:
|
||||||
// count of refrence
|
// count of refrence
|
||||||
UINT32 m_uRefrence;
|
UINT32 m_uRefrence;
|
||||||
// is the object autoreleased
|
// is the object autoreleased
|
||||||
BOOL m_bManaged;
|
bool m_bManaged;
|
||||||
public:
|
public:
|
||||||
NSObject(void);
|
NSObject(void);
|
||||||
~NSObject(void);
|
~NSObject(void);
|
||||||
|
@ -53,9 +53,9 @@ public:
|
||||||
virtual void retain(void);
|
virtual void retain(void);
|
||||||
NSObject* autorelease(void);
|
NSObject* autorelease(void);
|
||||||
NSObject* copy(void);
|
NSObject* copy(void);
|
||||||
BOOL isSingleRefrence(void);
|
bool isSingleRefrence(void);
|
||||||
UINT32 retainCount(void);
|
UINT32 retainCount(void);
|
||||||
BOOL isEqual(const NSObject* pObject);
|
bool isEqual(const NSObject* pObject);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __COCOA_NSOBJECT_H__
|
#endif // __COCOA_NSOBJECT_H__
|
||||||
|
|
|
@ -46,7 +46,6 @@ THE SOFTWARE.
|
||||||
#undef INT32
|
#undef INT32
|
||||||
#undef INT64
|
#undef INT64
|
||||||
#undef UINT64
|
#undef UINT64
|
||||||
#undef BOOL
|
|
||||||
|
|
||||||
#define INT8 Int8
|
#define INT8 Int8
|
||||||
#define UINT8 UInt8
|
#define UINT8 UInt8
|
||||||
|
|
Loading…
Reference in New Issue