2011-06-14 14:31:25 +08:00
|
|
|
|
|
|
|
class CCMutableArray : public CCObject
|
|
|
|
{
|
2012-02-02 14:26:38 +08:00
|
|
|
TOLUA_TEMPLATE_BIND(T, CCObject*, CCSpriteFrame*, CCFiniteTimeAction*)
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 22:15:34 +08:00
|
|
|
CCMutableArray(unsigned int uSize = 0);
|
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
unsigned int count(void);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
bool containsObject(T pObject);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
T getLastObject(void);
|
|
|
|
T getObjectAtIndex(unsigned int uIndex);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
void addObject(T pObject);
|
|
|
|
void addObjectsFromArray(CCMutableArray<T> *pArray);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
|
|
|
void insertObjectAtIndex(T pObject, unsigned int uIndex);
|
2012-02-02 14:26:38 +08:00
|
|
|
void removeLastObject(bool bDeleteObject = true);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
void removeObject(T pObject, bool bDeleteObject = true);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
void removeObjectsInArray(CCMutableArray<T>* pDeleteArray);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
void removeObjectAtIndex(unsigned int uIndex, bool bDeleteObject = true);
|
|
|
|
void removeAllObjects(bool bDeleteObject = true);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
void replaceObjectAtIndex(unsigned int uIndex, T pObject, bool bDeleteObject = true);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
std::vector<T>::iterator begin(void);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
std::vector<T>::reverse_iterator rbegin(void);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
std::vector<T>::iterator endToLua(void);
|
|
|
|
std::vector<T>::reverse_iterator rend(void);
|
|
|
|
CCMutableArray<T>* copy(void);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
static CCMutableArray<T>* arrayWithArray(CCMutableArray<T> *pArray);
|
2011-06-14 14:31:25 +08:00
|
|
|
};
|