6#ifndef _ZFI_ZFIOCache_h_
7#define _ZFI_ZFIOCache_h_
util object to hold ZFObject as cache
_ZFT_t_zfchar zfchar
char wrapper
Definition ZFCoreTypeDef_CharType.h:17
#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
_ZFT_t_zfindex zfindex
similar to size_t, used for index and size only
Definition ZFCoreTypeDef_CoreType.h:154
_zft_zftimet zftimet
time unit, ensured at least 64 bit, ensured signed
Definition ZFCoreTypeDef_CoreType.h:203
#define zfnull
same as NULL, defined for future use
Definition ZFCoreTypeDef_CoreType.h:88
zfautoT< ZFTaskId > ZFIOCacheLoad(const ZFInput &src, const ZFListener &callback, const ZFListener &loadImpl=(zft_zfnull))
load contents with cache logic
#define ZFMP_IN_OPT(ParamType, paramName, DefaultValue)
see ZFMP_IN
Definition ZFMethod.h:108
#define ZFMP_IN(ParamType, paramName)
macro to wrap param types for ZFMETHOD_INLINE_0 series
Definition ZFMethod.h:105
#define ZFMETHOD_DECLARE_0(ReturnType, MethodName)
see ZFMethod
Definition ZFMethodDeclare.h:693
#define ZFMETHOD_DECLARE_1(ReturnType, MethodName, ZFMP_0)
see ZFMethod
Definition ZFMethodDeclare.h:854
#define ZFMETHOD_FUNC_DECLARE_3(ZFLIB_, ReturnType, MethodName, ZFMP_0, ZFMP_1, ZFMP_2)
see ZFMETHOD_FUNC_DECLARE_0
Definition ZFMethodFuncDeclare.h:910
#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_2(ZFMP_0, ZFMP_1)
see ZFOBJECT_ON_INIT_INLINE_1
Definition ZFObjectDeclare.h:290
#define ZFOBJECT_DECLARE(ChildClass, SuperClass,...)
necessary for every class inherit from ZFObject
Definition ZFObjectDeclare.h:126
#define ZFOBJECT_SINGLETON_DECLARE(AccessTypeName, accessMethodName)
util macro to declare a singleton instance access for ZFObject type
Definition ZFObjectGlobalInstance.h:256
const zfstring & ZFPathType_modulePath()
see ZFPathInfo
Definition ZFPathType_common.h:18
const zfstring & ZFPathType_storagePath()
see ZFPathInfo
Definition ZFPathType_common.h:34
const zfstring & ZFPathType_cachePath()
see ZFPathInfo
Definition ZFPathType_common.h:52
const zfstring & ZFPathType_text()
see ZFPathInfo
Definition ZFPathType_common.h:59
const zfstring & ZFPathType_storageSharedPath()
see ZFPathInfo
Definition ZFPathType_common.h:42
const zfstring & ZFPathType_file()
see ZFPathInfo
Definition ZFPathType_file.h:18
const zfstring & ZFPathType_res()
see ZFPathInfo
Definition ZFPathType_res.h:18
#define ZFPROPERTY_ASSIGN(Type, Name,...)
see ZFPROPERTY_RETAIN
Definition ZFPropertyDeclare.h:128
#define ZFPROPERTY_RETAIN_READONLY(Type, Name, InitValueOrEmpty)
see ZFPROPERTY_RETAIN
Definition ZFPropertyDeclare.h:110
#define ZFPROPERTY_ON_INIT_DECLARE_NO_AUTO_INIT(Type, Name)
see ZFPROPERTY_ON_INIT_DECLARE
Definition ZFPropertyDeclare.h:213
v_ZFResultType::ZFEnumType ZFResultType
see v_ZFResultType
Definition ZFResultType.h:23
#define ZFLIB_ZFUtility
used to export symbols
Definition ZFUtilityDef.h:15
virtual zfindex & cacheMaxSize()
max cache size, 10 by default
Definition ZFCache.h:42
virtual zfanyT< ZFSet > const & localCacheExclude()
a list of path type which should not stored as local cache
Definition ZFIOCache.h:35
virtual ZFPathInfo & localCachePathInfo()
override default cache path
Definition ZFIOCache.h:52
virtual ZFPathInfo localCachePathInfoForChild(const zfchar *childPath)
util method to get a cache file under localCachePathInfo
virtual zfindex & localCacheMaxSize()
max local cache count to keep
Definition ZFIOCache.h:40
static ZFIOCache * instance()
virtual ZFPathInfo localCachePathInfoFixed()
return a fixed path info of localCachePathInfo
virtual zftimet & localCacheTime()
cache time in miliseconds
Definition ZFIOCache.h:44
virtual void taskOnStart(void)
called to start task
virtual void objectOnInit(void)
override this to init your object
Definition ZFIOCache.h:103
virtual ZFListener & loadImpl()
the load impl
Definition ZFIOCache.h:99
virtual ZFInput & input()
the src input
Definition ZFIOCache.h:97
virtual void taskOnStop(ZFResultType resultType)
called to stop task
listener as ZFCallback, mostly used by ZFObject::observerNotify
Definition ZFObjectObserver.h:30
path related info storage for impl, actual meaning of the info depends on impl
Definition ZFPathInfo.h:35
container of ZFObject, see ZFContainer
Definition ZFSet.h:17
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
abstract task id
Definition ZFTaskId.h:16
type wrapper for ZFTypeId::Value
Definition ZFTypeId_CoreType.h:198
see zfany
Definition zfany.h:106
type restrict version of zfauto
Definition zfautoFwd.h:110
util class to alloc and hold ZFObject type
Definition ZFObjectAutoPtr.h:157