From 528635604eea1d8c679a3d038e2f00030ef72444 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:03:20 +0200 Subject: 3.2 --- fileHierarchy.h | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) (limited to 'fileHierarchy.h') diff --git a/fileHierarchy.h b/fileHierarchy.h index 9f0aec4c..d26d527e 100644 --- a/fileHierarchy.h +++ b/fileHierarchy.h @@ -10,6 +10,7 @@ #include "structures.h" #include #include "shared/guid.h" +#include "library/filter.h" class DirectoryBuffer; @@ -95,9 +96,8 @@ private: struct DirInformation { //filter settings (used when retrieving directory data) - bool filterActive; - Zstring includeFilter; - Zstring excludeFilter; + FilterProcess::FilterRef filter; + //hierarchical directory information DirContainer baseDirContainer; }; @@ -209,10 +209,10 @@ public: //comparison result virtual CompareFilesResult getCategory() const = 0; - virtual const wxString& getCatConflict() const = 0; //only filled if cmpResult == FILE_CONFLICT + virtual const wxString& getCatConflict() const = 0; //only filled if getCategory() == FILE_CONFLICT //sync operation SyncOperation getSyncOperation() const; - const wxString& getSyncOpConflict() const; //only filled if syncDir == SYNC_DIR_INT_CONFLICT + const wxString& getSyncOpConflict() const; //only filled if getSyncOperation() == SYNC_DIR_INT_CONFLICT SyncOperation testSyncOperation(bool selected, SyncDirection syncDir) const; //get syncOp with provided settings //sync settings @@ -367,31 +367,16 @@ class BaseDirMapping : public HierarchyObject //synchronization base directory public: BaseDirMapping(const Zstring& dirPostfixedLeft, const Zstring& dirPostfixedRight, - bool filterActive, - const Zstring& includeFilter, - const Zstring& excludeFilter) : + const FilterProcess::FilterRef& filterIn) : HierarchyObject(dirPostfixedLeft, dirPostfixedRight), - filter(filterActive, includeFilter, excludeFilter) {} - - struct FilterSettings - { - FilterSettings(bool active, - const Zstring& include, - const Zstring& exclude) : - filterActive(active), - includeFilter(include), - excludeFilter(exclude) {} - bool filterActive; - Zstring includeFilter; - Zstring excludeFilter; - }; + filter(filterIn) {} - const FilterSettings& getFilter() const; + const FilterProcess::FilterRef& getFilter() const; template Zstring getDBFilename() const; virtual void swap(); private: - FilterSettings filter; + FilterProcess::FilterRef filter; }; @@ -834,7 +819,7 @@ void DirMapping::copyToR() inline -const BaseDirMapping::FilterSettings& BaseDirMapping::getFilter() const +const FilterProcess::FilterRef& BaseDirMapping::getFilter() const { return filter; } -- cgit