ZFFramework
 
Loading...
Searching...
No Matches
ZFUIImageCache.h
Go to the documentation of this file.
1
5
6#ifndef _ZFI_ZFUIImageCache_h_
7#define _ZFI_ZFUIImageCache_h_
8
9#include "ZFUIWidgetDef.h"
11
20 , ZFMP_IN(const ZFInput &, src)
21 , ZFMP_IN(const ZFListener &, callback)
22 )
23
24// ============================================================
28zfclass ZFLIB_ZFUIWidget ZFUIImageLoadTask : zfextend ZFTask {
29 ZFOBJECT_DECLARE(ZFUIImageLoadTask, ZFTask)
30
31public:
34
35protected:
37 virtual void objectOnInit(void) {
39 }
40
42 ZFMP_IN(const ZFInput &, input)
43 )
44
45public:
47 virtual void taskOnStart(void);
50private:
51 zfautoT<ZFTaskId> _implTaskId;
52};
53
55#endif // #ifndef _ZFI_ZFUIImageCache_h_
56
#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:180
#define ZFMP_IN(ParamType, paramName)
macro to wrap param types for ZFMETHOD_INLINE_0 series
Definition ZFMethod.h:105
#define ZFMETHOD_FUNC_DECLARE_2(ZFLIB_, ReturnType, MethodName, ZFMP_0, ZFMP_1)
see ZFMETHOD_FUNC_DECLARE_0
Definition ZFMethodFuncDeclare.h:763
#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 zfclass
same as class, shows that this class is a ZFObject type
Definition ZFObjectClassTypeFwd.h:38
#define ZFOBJECT_ON_INIT_DECLARE_1(ZFMP_0)
see ZFOBJECT_ON_INIT_INLINE_1
Definition ZFObjectDeclare.h:263
#define ZFOBJECT_DECLARE(ChildClass, SuperClass,...)
necessary for every class inherit from ZFObject
Definition ZFObjectDeclare.h:126
#define ZFPROPERTY_ASSIGN(Type, Name,...)
see ZFPROPERTY_RETAIN
Definition ZFPropertyDeclare.h:128
v_ZFResultType::ZFEnumType ZFResultType
see v_ZFResultType
Definition ZFResultType.h:23
zfautoT< ZFTaskId > ZFUIImageLoad(const ZFInput &src, const ZFListener &callback)
load image with cache logic
global header for ZFUIWidget module
#define ZFLIB_ZFUIWidget
used to export symbols
Definition ZFUIWidgetDef.h:17
general input callback
Definition ZFIOCallback_input.h:37
listener as ZFCallback, mostly used by ZFObject::observerNotify
Definition ZFObjectObserver.h:30
virtual ZFResultType & resultType()
for task impl to store task result, reset to success when start
Definition ZFTask.h:84
virtual void objectOnInit(const ZFListener &implOnStart, const ZFListener &implOnStop=(zft_zfnull))
util constructor to attach custom impl to E_TaskOnStart and E_TaskOnStop
virtual ZFInput & input()
the src input
Definition ZFUIImageCache.h:33
virtual void taskOnStart(void)
called to start task
virtual void objectOnInit(void)
override this to init your object
Definition ZFUIImageCache.h:37
virtual void taskOnStop(ZFResultType resultType)
called to stop task
type restrict version of zfauto
Definition zfautoFwd.h:110