Class CCArrayForObjectSorting

#include <Geode/cocos/extensions/GUI/CCScrollView/CCSorting.h>
classCCArrayForObjectSorting:publiccocos2d::CCArray{ ... }
No description provided
Examples0
Public static methods0
Public member functions6
voidinsertSortedObject()

! Inserts a given object into array.

Inserts a given object into array with key and value that are used in sorting. “value” must respond to message, compare:, which returns (NSComparisonResult). If it does not respond to the message, it is appended. If the compare message does not result NSComparisonResult, sorting behavior is not defined. It ignores duplicate entries and inserts next to it.

Parameters

object

to insert
voidremoveSortedObject()

! Removes an object in array.

Removes an object with given key and value. If no object is found in array with the key and value, no action is taken.

Parameters

value

to remove
voidsetObjectID_ofSortedObject(
uinttag
,)

! Sets a new value of the key for the given object.

In case where sorting value must be changed, this message must be sent to keep consistency of being sorted. If it is changed externally, it must be sorted completely again.

Parameters

value

to set

object

the object which has the value
cocos2d::extension::CCSortableObject*objectWithObjectID(
uinttag
)
No description provided
cocos2d::extension::CCSortableObject*getObjectWithObjectID(
uinttag
)

! Returns an object with given key and value.

Returns an object with given key and value. If no object is found, it returns nil.

Parameters

value

to locate object
Return value
object found or nil.
uintindexOfSortedObject()

! Returns an index of the object with given key and value.

Returns the index of an object with given key and value. If no object is found, it returns an index at which the given object value would have been located. If object must be located at the end of array, it returns the length of the array, which is out of bound.

Parameters

value

to locate object
Return value
index of an object found
Fields0
Protected member functions0
Protected fields0
Derived classes0