6#ifndef _ZFI_zfstlmap_h_
7#define _ZFI_zfstlmap_h_
15 #define zfstlless std::less
20 #define zfstlmap std::map
25template<
typename T_Key,
typename T_Value,
typename T_Compare = zfstlless<T_Key> >
30 typename zfimplmap<T_Key, T_Value, T_Compare>::iterator it;
31 typename zfimplmap<T_Key, T_Value, T_Compare>::iterator end;
34 virtual zfbool valid(
void) {
38 virtual void next(
void) {
42 virtual Impl *copy(
void) {
49 virtual void destroy(
void) {
54 _Iter *t = (_Iter *)d;
62 impl->it = this->begin();
63 impl->end = this->end();
69 impl->it = this->find(key);
70 impl->end = this->end();
75 return it.impl<_Iter *>()->it->first;
78 return it.impl<_Iter *>()->it->second;
83 ,
ZF_IN T_Value
const &newValue
85 it.impl<_Iter *>()->it->second = newValue;
88 this->erase((it.impl<_Iter *>()->it)++);
92 ZF_IN T_Key
const &key
93 ,
ZF_IN T_Value
const &value
97 impl->end = this->end();
#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 zfextend
dummy macro shows class inherit from another
Definition ZFCoreTypeDef_ClassType.h:53
#define zfoverride
dummy macro shows that method override parent's method
Definition ZFCoreTypeDef_ClassType.h:58
#define ZF_IN
dummy macro that shows the param used as required input
Definition ZFCoreTypeDef_ClassType.h:196
#define ZF_IN_OUT
dummy macro that shows the param used as required input and output
Definition ZFCoreTypeDef_ClassType.h:212
_ZFT_t_zfbool zfbool
bool type
Definition ZFCoreTypeDef_CoreType.h:103
#define zfpoolDelete(obj)
see zfnew
Definition ZFMemPool.h:81
#define zfpoolNew(T_Type,...)
see zfnew
Definition ZFMemPool.h:80
see zfiter
Definition zfiter.h:84
iterator for ZFFramework
Definition zfiter.h:40
#define zfstlmap
stl wrapper
Definition zfstlmap.h:20
stl wrapper, note it's internal use only
#define zfstlpair
stl wrapper
Definition zfstlpair.h:15