2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
class CCArray : public CCObject
|
2011-06-14 14:31:25 +08:00
|
|
|
{
|
2012-02-02 14:26:38 +08:00
|
|
|
unsigned int count();
|
|
|
|
unsigned int capacity();
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
unsigned int indexOfObject(CCObject* object);
|
|
|
|
CCObject* objectAtIndex(unsigned int index);
|
|
|
|
CCObject* lastObject();
|
|
|
|
CCObject* randomObject();
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
bool containsObject(CCObject* object);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
void addObject(CCObject* object);
|
|
|
|
void addObjectsFromArray(CCArray* otherArray);
|
|
|
|
void insertObject(CCObject* object, unsigned int index);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
void removeLastObject();
|
|
|
|
void removeObject(CCObject* object);
|
|
|
|
void removeObjectAtIndex(unsigned int index);
|
|
|
|
void removeObjectsInArray(CCArray* otherArray);
|
|
|
|
void removeAllObjects();
|
|
|
|
void fastRemoveObject(CCObject* object);
|
|
|
|
void fastRemoveObjectAtIndex(unsigned int index);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2011-07-08 18:31:02 +08:00
|
|
|
void exchangeObject(CCObject* object1, CCObject* object2);
|
|
|
|
void exchangeObjectAtIndex(unsigned int index1, unsigned int index2);
|
|
|
|
void reverseObjects();
|
2012-02-02 14:26:38 +08:00
|
|
|
void reduceMemoryFootprint();
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
static CCArray* array();
|
|
|
|
static CCArray* arrayWithCapacity(unsigned int capacity);
|
|
|
|
static CCArray* arrayWithArray(CCArray* otherArray);
|
|
|
|
};
|