ZFFramework
|
light weight array More...
#include <ZFCoreArray.h>
Public Member Functions | |
ZFCoreArray (void) | |
main constructor | |
ZFCoreArray (const ZFCoreArray< T_Element > &ref) | |
construct from another array | |
virtual ZFCoreArrayBase * | refNew (void) const |
new reference | |
virtual void * | refImpl (void) const |
get the impl | |
ZFCoreArray< T_Element > & | operator= (const ZFCoreArray< T_Element > &ref) |
retain the array, if you want to copy, use copyFrom instead | |
void | swap (ZFCoreArray< T_Element > &ref) |
swap internal data | |
void | copyFrom (const ZFCoreArray< T_Element > &ref) |
copy all settings and contents from another array | |
zfindex | objectRetainCount (void) const |
get retain count | |
ZFCompareResult | objectCompare (const ZFCoreArray< T_Element > &ref, typename ZFComparer< T_Element >::Comparer comparer=_ZFP_ZFComparerCheckEqual) const |
compare by content | |
virtual void | objectInfoOfContentT (zfstring &ret, zfindex maxCount=((zfindex) -1), const ZFTokenForContainer &token=_ZFP_ZFTokenForContainerDefault) const |
return content info | |
void | objectInfoOfContentT (zfstring &ret, zfindex maxCount, const ZFTokenForContainer &token, typename ZFCoreInfoGetter< T_Element >::InfoGetter infoGetter) const |
see objectInfoOfContent | |
zfstring | objectInfoOfContent (zfindex maxCount=((zfindex) -1), const ZFTokenForContainer &token=_ZFP_ZFTokenForContainerDefault, typename ZFCoreInfoGetter< T_Element >::InfoGetter infoGetter=0) const |
return content info | |
virtual void | capacity (zfindex newCapacity) |
change capacity to hold at least newCapacity | |
virtual void | capacityTrim (void) |
trim current capacity | |
virtual zfindex | capacity (void) const |
get capacity | |
void | add (T_Element const &e) |
add element | |
void | add (zfindex index, T_Element const &e) |
add element at index | |
void | addFrom (const T_Element *src, zfindex count) |
add elements, src can be part of this array's buffer | |
void | addFrom (const ZFCoreArray< T_Element > &ref) |
add from another array | |
zfindex | find (T_Element const &e, typename ZFComparer< T_Element >::Comparer comparer=_ZFP_ZFComparerCheckEqual) const |
find element | |
zfindex | findReversely (T_Element const &e, typename ZFComparer< T_Element >::Comparer comparer=_ZFP_ZFComparerCheckEqual) const |
find element reversely | |
template<typename T_Another > | |
zfindex | find (T_Another const &e, typename ZFComparer< T_Element, T_Another >::Comparer comparer) const |
find element | |
template<typename T_Another > | |
zfindex | findReversely (T_Another const &e, typename ZFComparer< T_Element, T_Another >::Comparer comparer) const |
find element reversely | |
zfbool | removeElement (T_Element const &e, typename ZFComparer< T_Element >::Comparer comparer=_ZFP_ZFComparerCheckEqual) |
remove first matched element, return whether the element removed | |
template<typename T_Another > | |
zfbool | removeElement (T_Another const &e, typename ZFComparer< T_Element, T_Another >::Comparer comparer) |
remove first matched element, return whether the element removed | |
zfbool | removeElementReversely (T_Element const &e, typename ZFComparer< T_Element >::Comparer comparer=_ZFP_ZFComparerCheckEqual) |
remove last matched element, return whether the element removed | |
template<typename T_Another > | |
zfbool | removeElementReversely (T_Another const &e, typename ZFComparer< T_Element, T_Another >::Comparer comparer) |
remove last matched element, return whether the element removed | |
zfindex | removeElementAll (T_Element const &e, typename ZFComparer< T_Element >::Comparer comparer=_ZFP_ZFComparerCheckEqual) |
remove all matched element, return number of removed element | |
template<typename T_Another > | |
zfindex | removeElementAll (T_Another const &e, typename ZFComparer< T_Element, T_Another >::Comparer comparer) |
remove all matched element, return number of removed element | |
virtual void | remove (zfindex index) |
remove element at index with count, assert fail if out of range | |
virtual void | remove (zfindex index, zfindex count) |
remove element at index with count, assert fail if out of range | |
T_Element | removeAndGet (zfindex index) |
remove and return the removed value | |
virtual void | removeFirst (void) |
remove first or do nothing if empty | |
T_Element | removeFirstAndGet (void) |
remove first and return the removed value, or assert fail if empty | |
virtual void | removeLast (void) |
remove last or do nothing if empty | |
T_Element | removeLastAndGet (void) |
remove last and return the removed value, or assert fail if empty | |
virtual void | removeAll (void) |
remove all content | |
virtual void | move (zfindex fromIndex, zfindex toIndexOrIndexMax) |
move element | |
void | set (zfindex index, T_Element const &e) |
set element at index, or assert fail if index out of range | |
T_Element & | get (zfindex index) |
get element's reference at index | |
T_Element const & | get (zfindex index) const |
get element's const reference at index | |
T_Element & | operator[] (zfindex index) |
get element's reference at index | |
T_Element const & | operator[] (zfindex index) const |
get element's const reference at index | |
T_Element const & | getFirst (void) const |
try to get first element, assert fail if empty | |
T_Element const & | getLast (void) const |
try to get first element, assert fail if empty | |
T_Element * | arrayBuf (void) |
directly access the array | |
const T_Element * | arrayBuf (void) const |
see arrayBuf | |
virtual zfindex | count (void) const |
element count of this array | |
virtual zfbool | isEmpty (void) const |
true if empty | |
void | sort (zfindex start=0, zfindex count=((zfindex) -1), typename ZFComparer< T_Element >::Comparer elementComparer=_ZFP_ZFComparerDefault) |
sort element | |
void | sortReversely (zfindex start=0, zfindex count=((zfindex) -1), typename ZFComparer< T_Element >::Comparer elementComparer=_ZFP_ZFComparerDefault) |
sort element | |
virtual void | genericSwap (ZFCoreArrayBase &ref) |
generic version | |
virtual void | genericCopyFrom (const ZFCoreArrayBase &ref) |
generic version | |
virtual void | genericAdd (const void *e) |
generic version | |
virtual void | genericAdd (zfindex index, const void *e) |
generic version | |
virtual void | genericAddFrom (const void *e, zfindex count) |
generic version | |
virtual void | genericAddFrom (const ZFCoreArrayBase &ref) |
generic version | |
virtual void | genericSet (zfindex index, const void *e) |
generic version | |
virtual const void * | genericGet (zfindex index) const |
generic version | |
Public Member Functions inherited from ZFCoreArrayBase | |
virtual void | refDelete (void) |
delete reference | |
virtual void | objectInfoT (zfstring &ret) const |
see objectInfo | |
virtual zfstring | objectInfo (void) const |
return object info | |
virtual zfstring | objectInfoOfContent (zfindex maxCount=((zfindex) -1), const ZFTokenForContainer &token=_ZFP_ZFTokenForContainerDefault) const |
return content info | |
light weight array
REMARKS:
|
inlinevirtual |
new reference
Implements ZFCoreArrayBase.
|
inlinevirtual |
get the impl
Implements ZFCoreArrayBase.
|
inlinevirtual |
return content info
Implements ZFCoreArrayBase.
|
inlinevirtual |
change capacity to hold at least newCapacity
do nothing if newCapacity not changed or less than current capacity
Implements ZFCoreArrayBase.
|
inlinevirtual |
|
inlinevirtual |
get capacity
Implements ZFCoreArrayBase.
|
inlinevirtual |
remove element at index with count, assert fail if out of range
Implements ZFCoreArrayBase.
|
inlinevirtual |
remove element at index with count, assert fail if out of range
Implements ZFCoreArrayBase.
|
inlinevirtual |
remove first or do nothing if empty
Implements ZFCoreArrayBase.
|
inlinevirtual |
remove last or do nothing if empty
Implements ZFCoreArrayBase.
|
inlinevirtual |
remove all content
Implements ZFCoreArrayBase.
|
inlinevirtual |
move element
Implements ZFCoreArrayBase.
|
inline |
directly access the array
|
inlinevirtual |
element count of this array
Implements ZFCoreArrayBase.
|
inlinevirtual |
true if empty
Implements ZFCoreArrayBase.
|
inlinevirtual |
generic version
Implements ZFCoreArrayBase.
|
inlinevirtual |
generic version
Implements ZFCoreArrayBase.
|
inlinevirtual |
generic version
Implements ZFCoreArrayBase.
|
inlinevirtual |
generic version
Implements ZFCoreArrayBase.
|
inlinevirtual |
generic version
Implements ZFCoreArrayBase.
|
inlinevirtual |
generic version
Implements ZFCoreArrayBase.
|
inlinevirtual |
generic version
Implements ZFCoreArrayBase.
|
inlinevirtual |
generic version
Implements ZFCoreArrayBase.