ZFFramework
 
Loading...
Searching...
No Matches
ZFTextTemplateRun.h
Go to the documentation of this file.
1
5
6#ifndef _ZFI_ZFTextTemplateRun_h_
7#define _ZFI_ZFTextTemplateRun_h_
8
9#include "ZFTextTemplate.h"
11
29zfclass ZFLIB_ZFUtility ZFTextTemplateRunFilter : zfextend ZFStyle {
30 ZFOBJECT_DECLARE(ZFTextTemplateRunFilter, ZFStyle)
31 ZFOBJECT_SINGLETON_DECLARE(ZFTextTemplateRunFilter, instance)
32public:
41protected:
43 virtual void styleableOnCopyFrom(ZF_IN ZFObject *anotherStyleable) {
44 zfself *ref = zfcast(zfself *, anotherStyleable);
45 if(ref != zfnull && ref != this) {
46 this->dirNameFilter()->copyFrom(ref->dirNameFilter());
47 this->dirContentFilter()->copyFrom(ref->dirContentFilter());
48 this->fileNameFilter()->copyFrom(ref->fileNameFilter());
49 this->fileContentFilter()->copyFrom(ref->fileContentFilter());
50 }
51 }
52};
53
58 , ZFMP_IN(const ZFPathInfo &, pathInfo)
59 , ZFMP_IN(const ZFTextTemplateParam &, textTemplateParam)
60 , ZFMP_OUT_OPT(zfstring *, outErrorHint, zfnull)
61 )
62
64#endif // #ifndef _ZFI_ZFTextTemplateRun_h_
65
#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_zfbool zfbool
bool type
Definition ZFCoreTypeDef_CoreType.h:103
#define zfnull
same as NULL, defined for future use
Definition ZFCoreTypeDef_CoreType.h:88
zft_zfstring< zfchar > zfstring
see zft_zfstring
Definition ZFCoreTypeDef_StringType.h:15
#define ZFMP_OUT_OPT(ParamType, paramName, DefaultValue)
see ZFMP_IN
Definition ZFMethod.h:114
#define ZFMP_IN(ParamType, paramName)
macro to wrap param types for ZFMETHOD_INLINE_0 series
Definition ZFMethod.h:105
#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_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
#define ZFPROPERTY_RETAIN_READONLY(Type, Name, InitValueOrEmpty)
see ZFPROPERTY_RETAIN
Definition ZFPropertyDeclare.h:110
text template util
zfbool ZFTextTemplateRun(const ZFPathInfo &pathInfo, const ZFTextTemplateParam &textTemplateParam, zfstring *outErrorHint=(zft_zfnull))
util method to apply ZFTextTemplateApply to a given path recursively
#define ZFLIB_ZFUtility
used to export symbols
Definition ZFUtilityDef.h:15
container of ZFObject, see ZFContainer
Definition ZFArray.h:17
path related info storage for impl, actual meaning of the info depends on impl
Definition ZFPathInfo.h:34
see ZFTextTemplateApply
Definition ZFTextTemplateType.h:141
static ZFTextTemplateRunFilter * instance()
virtual zfanyT< ZFArray > const & fileNameFilter()
see ZFTextTemplateRunFilter, array of ZFRegExp
Definition ZFTextTemplateRun.h:38
virtual zfanyT< ZFArray > const & fileContentFilter()
see ZFTextTemplateRunFilter, array of ZFRegExp
Definition ZFTextTemplateRun.h:40
ZFTextTemplateRunFilter zfself
class ref to self
Definition ZFTextTemplateRun.h:30
virtual zfanyT< ZFArray > const & dirNameFilter()
see ZFTextTemplateRunFilter, array of ZFRegExp
Definition ZFTextTemplateRun.h:34
virtual void styleableOnCopyFrom(ZFObject *anotherStyleable)
for subclass to achieve custom style copy step, called by styleableCopyFrom, see ZFStyleable
Definition ZFTextTemplateRun.h:43
virtual zfanyT< ZFArray > const & dirContentFilter()
see ZFTextTemplateRunFilter, array of ZFRegExp
Definition ZFTextTemplateRun.h:36
see zfany
Definition zfany.h:109
util class to alloc and hold ZFObject type
Definition ZFObjectAutoPtr.h:79
#define zfcast(T_To, obj)
safely cast ZFObject types, return null if not desired type
Definition zfcast.h:28