2012-04-26 09:34:42 +08:00
|
|
|
class CCArray : public CCObject
|
|
|
|
{
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCArray* create();
|
2012-08-10 18:14:04 +08:00
|
|
|
|
|
|
|
static CCArray* createWithObject(CCObject* pObject);
|
|
|
|
static CCArray* createWithArray(CCArray* otherArray);
|
|
|
|
static CCArray* createWithCapacity(unsigned int capacity);
|
|
|
|
static CCArray* createWithContentsOfFile(const char* pFileName);
|
2012-04-26 09:34:42 +08:00
|
|
|
|
|
|
|
unsigned int count();
|
|
|
|
|
|
|
|
unsigned int capacity();
|
|
|
|
|
|
|
|
unsigned int indexOfObject(CCObject* object);
|
|
|
|
|
|
|
|
CCObject* objectAtIndex(unsigned int index);
|
|
|
|
|
|
|
|
CCObject* lastObject();
|
|
|
|
|
|
|
|
CCObject* randomObject();
|
|
|
|
|
2012-08-10 18:14:04 +08:00
|
|
|
bool isEqualToArray(CCArray* pOtherArray);
|
|
|
|
|
2012-04-26 09:34:42 +08:00
|
|
|
bool containsObject(CCObject* object);
|
|
|
|
|
|
|
|
void addObject(CCObject* object);
|
|
|
|
|
|
|
|
void addObjectsFromArray(CCArray* otherArray);
|
|
|
|
|
|
|
|
void insertObject(CCObject* object, unsigned int index);
|
|
|
|
|
|
|
|
void removeLastObject(bool bReleaseObj = true);
|
|
|
|
|
|
|
|
void removeObject(CCObject* object, bool bReleaseObj = true);
|
|
|
|
|
|
|
|
void removeObjectAtIndex(unsigned int index, bool bReleaseObj = true);
|
|
|
|
|
|
|
|
void removeObjectsInArray(CCArray* otherArray);
|
|
|
|
|
|
|
|
void removeAllObjects();
|
|
|
|
|
|
|
|
void fastRemoveObject(CCObject* object);
|
|
|
|
|
|
|
|
void fastRemoveObjectAtIndex(unsigned int index);
|
|
|
|
|
|
|
|
void exchangeObject(CCObject* object1, CCObject* object2);
|
|
|
|
|
|
|
|
void exchangeObjectAtIndex(unsigned int index1, unsigned int index2);
|
|
|
|
|
|
|
|
void reverseObjects();
|
|
|
|
|
|
|
|
void reduceMemoryFootprint();
|
|
|
|
|
|
|
|
void replaceObjectAtIndex(unsigned int uIndex, CCObject* pObject, bool bReleaseObject = true);
|
|
|
|
|
2012-06-27 14:21:29 +08:00
|
|
|
};
|