6#ifndef _ZFI_ZFCoreMap_h_
7#define _ZFI_ZFCoreMap_h_
133 template<
typename T_Element>
165 template<
typename T_Element>
167 ret.capacity(ret.count() + this->count());
212 template<
typename T_Element>
222 _ZFP_ZFCoreMapPrivate *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
core map type for private use only
Definition ZFCoreMap.h:26
void swap(ZFCoreMap &ref)
swap internal data
void allValueT(ZFCoreArray< T_Element > &ret) const
see allValue
Definition ZFCoreMap.h:166
zfstring objectInfoOfContent(zfindex maxCount=((zfindex) -1), const ZFTokenForKeyValueContainer &token=_ZFP_ZFTokenForKeyValueContainerDefault) const
return contents info
Definition ZFCoreMap.h:68
void remove(const zfstring &key)
remove or do nothing if not exist
void objectInfoT(zfstring &ret) const
see objectInfo
T_Element get(const zfstring &key) const
get value or null if not exist
Definition ZFCoreMap.h:134
zfstring iterKey(const zfiter &it) const
see zfiter
const ZFCorePointer * iterValue(const zfiter &it) const
see zfiter
zfbool isContain(const zfstring &key) const
true if contains the key
ZFCoreMap(void)
construct an empty map
zfstring objectInfo(void) const
return object info
Definition ZFCoreMap.h:54
zfiter iterFind(const zfstring &key) const
see zfiter
void iterAdd(const zfstring &key, const ZFCorePointer &value)
see zfiter
zfiter iter(void) const
see zfiter
void addFrom(const ZFCoreMap &ref)
add elements from ref
void allKeyT(ZFCoreArray< zfstring > &ret) const
see allKey
void iterValue(zfiter &it, const ZFCorePointer &newValue)
see zfiter
void removeAll(void)
remove all content
zfbool isEmpty(void) const
true if empty
T_Element iterValue(const zfiter &it) const
see zfiter
Definition ZFCoreMap.h:213
void set(const zfstring &key, const ZFCorePointer &value)
change value or create if not exist, value would be retained by this method
void allValueT(ZFCoreArray< const ZFCorePointer * > &ret) const
see allValue
ZFCoreMap(const ZFCoreMap &ref)
retain the ref, to copy, use copyFrom
void iterRemove(zfiter &it)
see zfiter
zfindex objectRetainCount(void) const
get current retain count
void copyFrom(const ZFCoreMap &ref)
copy all contents from ref, remove all before copy
zfindex count(void) const
return count
ZFCoreArray< zfstring > allKey(void) const
return a copy of all keys
Definition ZFCoreMap.h:147
const ZFCorePointer * get(const zfstring &key) const
get value or null if not exist
ZFCoreArray< const ZFCorePointer * > allValue(void) const
return a copy of all values
Definition ZFCoreMap.h:158
void objectInfoOfContentT(zfstring &ret, zfindex maxCount=((zfindex) -1), const ZFTokenForKeyValueContainer &token=_ZFP_ZFTokenForKeyValueContainerDefault) const
see objectInfoOfContent
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