holder object for observer logic, see ZFObject::observerNotify More...
#include <ZFObjectObserver.h>
Public Member Functions | |
void | observerAdd (zfidentity eventId, const ZFListener &observer, ZFLevel observerLevel=ZFLevelAppNormal) |
see ZFObject::observerNotify | |
void | observerAddForOnce (zfidentity eventId, const ZFListener &observer, ZFLevel observerLevel=ZFLevelAppNormal) |
see ZFObject::observerNotify | |
void | observerRemove (zfidentity eventId, const ZFListener &callback) |
see ZFObject::observerNotify | |
void | observerRemoveAll (zfidentity eventId) |
see ZFObject::observerNotify | |
void | observerRemoveAll (void) |
see ZFObject::observerNotify | |
zfbool | observerHasAdd (void) const |
see ZFObject::observerNotify | |
zfbool | observerHasAdd (zfidentity eventId) const |
see ZFObject::observerNotify | |
void | observerNotify (zfidentity eventId, ZFObject *param0=zft_zfnull, ZFObject *param1=zft_zfnull) const |
see ZFObject::observerNotify | |
void | observerNotifyWithSender (ZFObject *customSender, zfidentity eventId, ZFObject *param0=zft_zfnull, ZFObject *param1=zft_zfnull) const |
see ZFObject::observerNotify | |
void | observerNotifyReversely (zfidentity eventId, ZFObject *param0=zft_zfnull, ZFObject *param1=zft_zfnull) const |
see ZFObject::observerNotify | |
void | observerNotifyReverselyWithSender (ZFObject *customSender, zfidentity eventId, ZFObject *param0=zft_zfnull, ZFObject *param1=zft_zfnull) const |
see ZFObject::observerNotify | |
void | on (zfidentity eventId, const ZFListener &observer, ZFLevel observerLevel=ZFLevelAppNormal) |
util to observerAdd | |
void | observerHasAddStateAttach (zfidentity eventId, zfuint *flag, zfuint flagBit) |
attach a state that indicate whether the observer has add, for performance usage | |
void | observerHasAddStateDetach (zfidentity eventId, zfuint *flag, zfuint flagBit) |
see observerHasAddStateAttach | |
void | objectInfoT (zfstring &ret) const |
see objectInfo | |
zfstring | objectInfo (void) const |
return a short string describe the object | |
zfany | observerOwner (void) const |
owner object of this observer holder, or null if none | |
holder object for observer logic, see ZFObject::observerNotify
void ZFObserver::observerHasAddStateAttach | ( | zfidentity | eventId, |
zfuint * | flag, | ||
zfuint | flagBit ) |
attach a state that indicate whether the observer has add, for performance usage
notifying an observer requires much CPU to check and execute, even if no observer has ever added
to optimize this, you may attach a flag to indicate whether any observer has ever added
usage: