ZFFramework
 
Loading...
Searching...
No Matches
ZFProtocolZFPath.h
Go to the documentation of this file.
1
5
6#ifndef _ZFI_ZFProtocolZFPath_h_
7#define _ZFI_ZFProtocolZFPath_h_
8
9#include "ZFCore/ZFProtocol.h"
10#include "ZFCore/ZFFile.h"
12
17public:
21 virtual const zfstring &pathForModule(void) zfpurevirtual;
26
34 virtual void pathForSetting(ZF_IN const zfstring &path) zfpurevirtual;
35
43 virtual void pathForStorage(ZF_IN const zfstring &path) zfpurevirtual;
44
53
57 virtual const zfstring &pathForCache(void) zfpurevirtual;
61 virtual void pathForCache(ZF_IN const zfstring &path) zfpurevirtual;
65 virtual void pathForCacheClear(void) {
66 ZFFileRemove(this->pathForCache(), ZF_HINT("isRecursive")zftrue, ZF_HINT("isForce")zftrue);
67 }
69
71#endif // #ifndef _ZFI_ZFProtocolZFPath_h_
72
#define ZFLIB_ZFCore
used to export symbols
Definition ZFCoreEnvDef.h:30
#define zfpurevirtual
dummy macro shows that a method is pure virtual method
Definition ZFCoreTypeDef_ClassType.h:68
#define ZF_IN
dummy macro that shows the param used as required input
Definition ZFCoreTypeDef_ClassType.h:180
#define zftrue
bool true type
Definition ZFCoreTypeDef_CoreType.h:107
zft_zfstring< zfchar > zfstring
see zft_zfstring
Definition ZFCoreTypeDef_StringType.h:15
#define ZF_HINT(...)
dummy macro to show a hint
Definition ZFCoreUtilMacro.h:48
file utility
zfbool ZFFileRemove(const zfchar *path, zfbool isRecursive=(_ZFT_t_zftrue), zfbool isForce=(_ZFT_t_zftrue))
delete a file or directory from srcPath to dstPath
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
protocol definitions for ZFFramework
#define ZFPROTOCOL_INTERFACE_END(ModuleName)
for more information, please refer to ZFPROTOCOL_INTERFACE_BEGIN
Definition ZFProtocol.h:414
#define ZFPROTOCOL_INTERFACE_BEGIN(ZFLIB_, ModuleName)
declare a protocol interface for ZFFramework
Definition ZFProtocol.h:408
virtual const zfstring & pathForModuleFile(void)=0
see ZFPathForModuleFile
virtual const zfstring & pathForStorage(void)=0
see ZFPathForStorage
virtual const zfstring & pathForModule(void)=0
see ZFPathForModule
virtual void pathForStorage(const zfstring &path)=0
see ZFPathForStorage
virtual const zfstring & pathForStorageShared(void)=0
see ZFPathForStorageShared
virtual void pathForCacheClear(void)
see ZFPathForCacheClear
Definition ZFProtocolZFPath.h:65
virtual void pathForStorageShared(const zfstring &path)=0
see ZFPathForStorageShared
virtual const zfstring & pathForCache(void)=0
see ZFPathForCache
virtual void pathForCache(const zfstring &path)=0
see ZFPathForCache
virtual const zfstring & pathForSetting(void)=0
see ZFPathForSetting
virtual void pathForSetting(const zfstring &path)=0
see ZFPathForSetting