base class of filter More...
#include <ZFFilter.h>
Public Types | |
typedef ZFFilterResult(* | CustomFilterCallback) (T_Public const &e) |
custom filter callback for ZFFilter | |
Public Member Functions | |
ZFFilterBase (void) | |
main constructor | |
ZFFilterBase (const ZFFilterBase< T_Public, T_Internal > &ref) | |
construct from another filter, retain only, you should use copyFrom to copy contents | |
virtual ZFFilterBase< T_Public, T_Internal > & | operator= (const ZFFilterBase< T_Public, T_Internal > &ref) |
retain only | |
virtual void | copyFrom (ZFFilterBase< T_Public, T_Internal > const &ref) |
copy from another filter | |
virtual ZFFilterBase< T_Public, T_Internal > & | filter (T_Public const &e, ZFFilterType filterType=ZFFilterTypeExclude) |
add a element | |
virtual ZFFilterBase< T_Public, T_Internal > & | filterRemove (T_Public const &e, ZFFilterType filterType=ZFFilterTypeExclude) |
remove a element | |
virtual ZFFilterBase< T_Public, T_Internal > & | filterRemoveAt (zfindex index) |
remove a element | |
virtual void | filterRemoveAll (void) |
remove all contents of this filter | |
virtual zfindex | filterCount (void) const |
get count of element | |
virtual T_Public | filterElementAt (zfindex index) const |
get element at index | |
virtual T_Internal const & | filterInternalAt (zfindex index) const |
get filter data at index | |
virtual ZFFilterType | filterTypeAt (zfindex index) const |
get filter type for filter data at index | |
virtual ZFFilterBase< T_Public, T_Internal > & | customFilterCallbackAdd (typename ZFFilterBase< T_Public, T_Internal >::CustomFilterCallback customFilterCallback) |
add a custom filter callback | |
virtual ZFFilterBase< T_Public, T_Internal > & | customFilterCallbackRemove (typename ZFFilterBase< T_Public, T_Internal >::CustomFilterCallback customFilterCallback) |
remove custom filter callback | |
virtual ZFFilterBase< T_Public, T_Internal > & | customFilterCallbackRemove (zfindex index) |
remove custom filter callback | |
virtual zfindex | customFilterCallbackCount (void) const |
get custom filter callback count | |
virtual ZFFilterBase< T_Public, T_Internal >::CustomFilterCallback | customFilterCallbackAt (zfindex index) const |
get custom filter callback | |
virtual zfbool | filterPassed (T_Public const &e) const |
return true if e is not filtered by this filter, see ZFFilterType | |
virtual void | objectInfoT (zfstring &ret) const |
see objectInfo | |
virtual zfstring | objectInfo (void) const |
return object info | |
Protected Types | |
typedef ZFFilterBase< T_Public, T_Internal > | zfself |
typedef for self | |
Protected Member Functions | |
virtual zfbool | filterOnCheckValid (T_Public const &e) const |
return true if element is valid for a filter | |
virtual void | filterOnStore (T_Internal &to, T_Public const &from) const =0 |
store public type to internal storage type | |
virtual void | filterOnRemove (T_Internal &value) const |
called before value removed from filter | |
virtual void | filterOnAccess (T_Public &to, T_Internal const &from) const =0 |
access public type from internal storage type | |
virtual zfbool | filterOnCheckEqual (T_Internal const &e1, T_Public const &e2) const =0 |
true if e1 is regarded as equal to e2 | |
virtual zfbool | filterOnCheckActive (T_Public const &e) const |
called by filterPassed to check whether the element is filtered out | |
base class of filter
|
inlinevirtual |
add a element
note this method won't check duplicated data for performance
|
inlinevirtual |
see objectInfo
Reimplemented in ZFFilterForZFMethod, and ZFFilterForZFProperty.
|
inlineprotectedvirtual |
return true if element is valid for a filter
if false, won't be added to content by filter or compared by filterOnCheckEqual
Reimplemented in ZFFilterForStringBase< T_Public, T_Internal >.
|
protectedpure virtual |
store public type to internal storage type
Implemented in ZFFilterForStringBase< T_Public, T_Internal >.
|
protectedpure virtual |
access public type from internal storage type
Implemented in ZFFilterForStringBase< T_Public, T_Internal >.
|
protectedpure virtual |
true if e1 is regarded as equal to e2
subclass may override this to supply custom comparation
Implemented in ZFFilterForStringBase< T_Public, T_Internal >.