6#ifndef _ZFI_ZFCoreOrderMap_h_
7#define _ZFI_ZFCoreOrderMap_h_
127 template<
typename T_Element>
159 template<
typename T_Element>
161 ret.capacity(ret.count() + this->count());
206 template<
typename T_Element>
225 template<
typename T_Element>
235 _ZFP_ZFCoreOrderMapPrivate *d;
#define ZFLIB_ZFCore
used to export symbols
Definition ZFCoreEnvDef.h:30
light weight smart pointer
#define zffinal
dummy macro shows that a method or class is designed must not to be overrided
Definition ZFCoreTypeDef_ClassType.h:63
#define zfclassLikePOD
shows the class is not a POD type, but you may use it like a POD except memset it to 0
Definition ZFCoreTypeDef_ClassType.h:41
#define ZF_IN
dummy macro that shows the param used as required input
Definition ZFCoreTypeDef_ClassType.h:180
#define ZF_IN_OPT
dummy macro that shows the param used as optional input
Definition ZFCoreTypeDef_ClassType.h:184
#define ZF_IN_OUT
dummy macro that shows the param used as required input and output
Definition ZFCoreTypeDef_ClassType.h:196
#define zfclassFwd
forward declaration of a class type
Definition ZFCoreTypeDef_ClassType.h:31
_ZFT_t_zfbool zfbool
bool type
Definition ZFCoreTypeDef_CoreType.h:103
_ZFT_t_zfindex zfindex
similar to size_t, used for index and size only
Definition ZFCoreTypeDef_CoreType.h:154
#define zfindexMax()
(zfindex)-1, indicate a max index value, see zfindex
Definition ZFCoreTypeDef_CoreType.h:159
#define zfnull
same as NULL, defined for future use
Definition ZFCoreTypeDef_CoreType.h:88
#define ZFOUTPUT_TYPE(T_Type, outputAction)
declare your custom type conversion to string, convenient for debug
Definition ZFCoreTypeDef_OtherType.h:221
zft_zfstring< zfchar > zfstring
see zft_zfstring
Definition ZFCoreTypeDef_StringType.h:15
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
#define ZFTokenForKeyValueContainerDefault()
see ZFTokenForKeyValueContainer, modifyable, ZFTokenForKeyValueContainerTrim by default
Definition ZFToken.h:214
light weight array
Definition ZFCoreArray.h:331
map type which keeps item order, for private use only
Definition ZFCoreOrderMap.h:20
const ZFCorePointer * get(const zfstring &key) const
get value or null if not exist
zfstring objectInfoOfContent(zfindex maxCount=((zfindex) -1), const ZFTokenForKeyValueContainer &token=_ZFP_ZFTokenForKeyValueContainerDefault) const
return contents info
Definition ZFCoreOrderMap.h:62
zfbool isContain(const zfstring &key) const
true if contains the key
void allKeyT(ZFCoreArray< zfstring > &ret) const
see allKey
zfindex objectRetainCount(void) const
get current retain count
void remove(const zfstring &key)
remove or do nothing if not exist
void swap(ZFCoreOrderMap &ref)
swap internal data
void iterRemove(zfiter &it)
see zfiter
T_Element get(const zfstring &key) const
get value or null if not exist
Definition ZFCoreOrderMap.h:128
zfstring iterKey(const zfiter &it) const
see zfiter
zfbool isEmpty(void) const
true if empty
ZFCoreArray< zfstring > allKey(void) const
return a copy of all keys
Definition ZFCoreOrderMap.h:141
void allValueT(ZFCoreArray< T_Element > &ret) const
see allValue
Definition ZFCoreOrderMap.h:160
T_Element update(const zfstring &key) const
try update value order by moving to tail, return null if not exist
Definition ZFCoreOrderMap.h:226
T_Element iterValue(const zfiter &it) const
see zfiter
Definition ZFCoreOrderMap.h:207
void removeAll(void)
remove all content
zfiter iterFind(const zfstring &key) const
see zfiter
ZFCoreOrderMap(void)
construct an empty map
zfstring objectInfo(void) const
return object info
Definition ZFCoreOrderMap.h:48
zfiter iter(void) const
see zfiter
ZFCoreOrderMap(const ZFCoreOrderMap &ref)
retain the ref, to copy, use copyFrom
const ZFCorePointer * iterValue(const zfiter &it) const
see zfiter
void allValueT(ZFCoreArray< const ZFCorePointer * > &ret) const
see allValue
void set(const zfstring &key, const ZFCorePointer &value)
change value or create if not exist, value would be retained by this method
void addFrom(const ZFCoreOrderMap &ref)
add elements from ref
ZFCoreArray< const ZFCorePointer * > allValue(void) const
return a copy of all values
Definition ZFCoreOrderMap.h:152
void copyFrom(const ZFCoreOrderMap &ref)
copy all contents from ref, remove all before copy
void iterValue(zfiter &it, const ZFCorePointer &newValue)
see zfiter
const ZFCorePointer * update(const zfstring &key) const
try update value order by moving to tail, return null if not exist
void objectInfoOfContentT(zfstring &ret, zfindex maxCount=((zfindex) -1), const ZFTokenForKeyValueContainer &token=_ZFP_ZFTokenForKeyValueContainerDefault) const
see objectInfoOfContent
zfindex count(void) const
return count
void objectInfoT(zfstring &ret) const
see objectInfo
void iterAdd(const zfstring &key, const ZFCorePointer &value)
see zfiter
abstract base class for ZFCorePointerT
Definition ZFCorePointer.h:46
T_PointerDesired pointerValueT(void) const
util method to get and cast to desired type
Definition ZFCorePointer.h:124
util class to hold string tokens
Definition ZFToken.h:113
iterator for ZFFramework
Definition zfiter.h:40