diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:12:46 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:12:46 +0200 |
commit | b338e29fd3eaf700f8c8360aa0310048ba941d54 (patch) | |
tree | 122f8ef3790d12cd10275ef7453a9e8053322d78 /comparison.h | |
parent | 3.18 (diff) | |
download | FreeFileSync-b338e29fd3eaf700f8c8360aa0310048ba941d54.tar.gz FreeFileSync-b338e29fd3eaf700f8c8360aa0310048ba941d54.tar.bz2 FreeFileSync-b338e29fd3eaf700f8c8360aa0310048ba941d54.zip |
3.19
Diffstat (limited to 'comparison.h')
-rw-r--r-- | comparison.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/comparison.h b/comparison.h index f3c9ac52..444b3c3c 100644 --- a/comparison.h +++ b/comparison.h @@ -22,15 +22,18 @@ struct FolderPairCfg FolderPairCfg(const Zstring& leftDir, //must be formatted folder pairs! const Zstring& rightDir, const NormalizedFilter& filterIn, + SymLinkHandling handleSymlinksIn, const SyncConfig& syncCfg) : leftDirectoryFmt(leftDir), rightDirectoryFmt(rightDir), filter(filterIn), + handleSymlinks(handleSymlinksIn), syncConfiguration(syncCfg) {} Zstring leftDirectoryFmt; //resolved folder pairs!!! Zstring rightDirectoryFmt; // NormalizedFilter filter; + SymLinkHandling handleSymlinks; SyncConfig syncConfiguration; }; @@ -41,28 +44,31 @@ std::vector<FolderPairCfg> extractCompareCfg(const MainConfiguration& mainCfg); class CompareProcess { public: - CompareProcess(SymLinkHandling handleSymlinks, - size_t fileTimeTol, + CompareProcess(size_t fileTimeTol, xmlAccess::OptionalDialogs& warnings, ProcessCallback& handler); void startCompareProcess(const std::vector<FolderPairCfg>& directoryPairs, const CompareVariant cmpVar, FolderComparison& output); +~CompareProcess(); private: - void compareByTimeSize(const std::vector<FolderPairCfg>& directoryPairsFormatted, FolderComparison& output) const; - void compareByContent( const std::vector<FolderPairCfg>& directoryPairsFormatted, FolderComparison& output) const; + void compareByTimeSize(const std::vector<FolderPairCfg>& directoryPairsFormatted, FolderComparison& output); + void compareByContent( const std::vector<FolderPairCfg>& directoryPairsFormatted, FolderComparison& output); //create comparison result table and fill category except for files existing on both sides: undefinedFiles and undefinedLinks are appended! - void performBaseComparison(BaseDirMapping& output, std::vector<FileMapping*>& undefinedFiles, std::vector<SymLinkMapping*>& undefinedLinks) const; - void categorizeSymlinkByTime(SymLinkMapping* linkObj) const; void categorizeSymlinkByContent(SymLinkMapping* linkObj) const; + void performComparison(const FolderPairCfg& fpCfg, + BaseDirMapping& output, + std::vector<FileMapping*>& undefinedFiles, + std::vector<SymLinkMapping*>& undefinedLinks); + //buffer accesses to the same directories; useful when multiple folder pairs are used class DirectoryBuffer; - std::shared_ptr<DirectoryBuffer> directoryBuffer; //std::auto_ptr does not work with forward declarations (Or we need a non-inline ~CompareProcess())! + std::unique_ptr<DirectoryBuffer> directoryBuffer; const size_t fileTimeTolerance; //max allowed file time deviation |