cocos2d-x
2.2.3-gd2.113-rev1ec524e
|
NA. More...
#include <CCArray.h>
Public Member Functions | |
~CCArray () | |
NA. More... | |
bool | init () |
Initializes an array NA. More... | |
bool | initWithObject (CCObject *pObject) |
Initializes an array with one object NA. More... | |
bool | initWithObjects (CCObject *pObject,...) |
Initializes an array with some objects NA. More... | |
bool | initWithCapacity (unsigned int capacity) |
Initializes an array with capacity NA. More... | |
bool | initWithArray (CCArray *otherArray) |
Initializes an array with an existing array NA. More... | |
unsigned int | count () const |
Returns element count of the array. More... | |
unsigned int | capacity () const |
Returns capacity of the array. More... | |
unsigned int | indexOfObject (CCObject *object) const |
Returns index of a certain object, return UINT_MAX if doesn't contain the object. More... | |
CCObject * | objectAtIndex (unsigned int index) |
Returns an element with a certain index. More... | |
CCObject * | lastObject () |
Returns last element. More... | |
CCObject * | randomObject () |
Returns a random element. More... | |
bool | containsObject (CCObject *object) const |
Returns a Boolean value that indicates whether object is present in array. More... | |
bool | isEqualToArray (CCArray *pOtherArray) |
void | addObject (CCObject *object) |
Add a certain object. More... | |
void | addObjectsFromArray (CCArray *otherArray) |
Add all elements of an existing array. More... | |
void | insertObject (CCObject *object, unsigned int index) |
Insert a certain object at a certain index. More... | |
void | removeLastObject (bool bReleaseObj=true) |
Remove last object. More... | |
void | removeObject (CCObject *object, bool bReleaseObj=true) |
Remove a certain object. More... | |
void | removeObjectAtIndex (unsigned int index, bool bReleaseObj=true) |
Remove an element with a certain index. More... | |
void | removeObjectsInArray (CCArray *otherArray) |
Remove all elements. More... | |
void | removeAllObjects () |
Remove all objects. More... | |
void | fastRemoveObject (CCObject *object) |
Fast way to remove a certain object. More... | |
void | fastRemoveObjectAtIndex (unsigned int index) |
Fast way to remove an element with a certain index. More... | |
void | exchangeObject (CCObject *object1, CCObject *object2) |
Swap two elements. More... | |
void | exchangeObjectAtIndex (unsigned int index1, unsigned int index2) |
Swap two elements with certain indexes. More... | |
void | replaceObjectAtIndex (unsigned int uIndex, CCObject *pObject, bool bReleaseObject=true) |
Replace object at index with another object. More... | |
void | reverseObjects () |
Revers the array. More... | |
void | reduceMemoryFootprint () |
virtual CCObject * | copyWithZone (CCZone *pZone) |
override functions NA NA More... | |
virtual void | acceptVisitor (CCDataVisitor &visitor) |
CCArray () | |
NA. More... | |
CCArray (unsigned int capacity) | |
NA. More... | |
![]() | |
CCObject (void) | |
virtual | ~CCObject (void) |
NA. More... | |
void | release (void) |
void | retain (void) |
CCObject * | autorelease (void) |
CCObject * | copy (void) |
bool | isSingleReference (void) const |
unsigned int | retainCount (void) const |
virtual bool | isEqual (const CCObject *pObject) |
virtual void | acceptVisitor (CCDataVisitor &visitor) |
virtual void | update (float dt) |
CCObject (const CCObject &) | |
CCObject & | operator= (const CCObject &) |
virtual void | encodeWithCoder (DS_Dictionary *) |
virtual bool | canEncode () |
CCObjectType | getObjType () const |
virtual int | getTag () const |
virtual void | setTag (int nTag) |
void | setObjType (CCObjectType) |
virtual CCObject * | copyWithZone (CCZone *pZone) |
Static Public Member Functions | |
static CCArray * | create () |
Create an array. More... | |
static CCArray * | create (CCObject *pObject,...) |
Create an array with some objects NA. More... | |
static CCArray * | createWithObject (CCObject *pObject) |
Create an array with one object. More... | |
static CCArray * | createWithCapacity (unsigned int capacity) |
Create an array with capacity. More... | |
static CCArray * | createWithArray (CCArray *otherArray) |
Create an array with an existing array. More... | |
static CCArray * | createWithContentsOfFile (const char *pFileName) |
Generate a CCArray pointer by file. More... | |
static CCArray * | createWithContentsOfFileThreadSafe (const char *pFileName) |
![]() | |
static CCObject * | createWithCoder (DS_Dictionary *) |
Public Attributes | |
ccArray * | data |
![]() | |
unsigned int | m_uID |
int | m_nLuaID |
Additional Inherited Members | |
![]() | |
unsigned int | m_uReference |
unsigned int | m_uAutoReleaseCount |
int | m_nTag |
int | m_eObjType |
unsigned int | m_uObjectIdxInArray |
NA.
~CCArray | ( | ) |
NA.
CCArray | ( | ) |
NA.
CCArray | ( | unsigned int | capacity | ) |
NA.
|
virtual |
Reimplemented from CCObject.
void addObject | ( | CCObject * | object | ) |
Add a certain object.
void addObjectsFromArray | ( | CCArray * | otherArray | ) |
Add all elements of an existing array.
unsigned int capacity | ( | ) | const |
Returns capacity of the array.
bool containsObject | ( | CCObject * | object | ) | const |
Returns a Boolean value that indicates whether object is present in array.
override functions NA NA
Reimplemented from CCCopying.
unsigned int count | ( | ) | const |
Returns element count of the array.
|
static |
Create an array.
Create an array with an existing array.
|
static |
Create an array with capacity.
|
static |
|
static |
void exchangeObjectAtIndex | ( | unsigned int | index1, |
unsigned int | index2 | ||
) |
Swap two elements with certain indexes.
void fastRemoveObject | ( | CCObject * | object | ) |
Fast way to remove a certain object.
void fastRemoveObjectAtIndex | ( | unsigned int | index | ) |
Fast way to remove an element with a certain index.
unsigned int indexOfObject | ( | CCObject * | object | ) | const |
Returns index of a certain object, return UINT_MAX if doesn't contain the object.
bool init | ( | ) |
Initializes an array NA.
bool initWithArray | ( | CCArray * | otherArray | ) |
Initializes an array with an existing array NA.
bool initWithCapacity | ( | unsigned int | capacity | ) |
Initializes an array with capacity NA.
bool initWithObject | ( | CCObject * | pObject | ) |
Initializes an array with one object NA.
bool initWithObjects | ( | CCObject * | pObject, |
... | |||
) |
Initializes an array with some objects NA.
void insertObject | ( | CCObject * | object, |
unsigned int | index | ||
) |
Insert a certain object at a certain index.
bool isEqualToArray | ( | CCArray * | pOtherArray | ) |
CCObject * lastObject | ( | ) |
Returns last element.
CCObject * objectAtIndex | ( | unsigned int | index | ) |
Returns an element with a certain index.
CCObject * randomObject | ( | ) |
Returns a random element.
void reduceMemoryFootprint | ( | ) |
void removeAllObjects | ( | ) |
Remove all objects.
void removeLastObject | ( | bool | bReleaseObj = true | ) |
Remove last object.
void removeObject | ( | CCObject * | object, |
bool | bReleaseObj = true |
||
) |
Remove a certain object.
void removeObjectAtIndex | ( | unsigned int | index, |
bool | bReleaseObj = true |
||
) |
Remove an element with a certain index.
void removeObjectsInArray | ( | CCArray * | otherArray | ) |
Remove all elements.
void replaceObjectAtIndex | ( | unsigned int | uIndex, |
CCObject * | pObject, | ||
bool | bReleaseObject = true |
||
) |
Replace object at index with another object.
void reverseObjects | ( | ) |
Revers the array.
ccArray* data |