diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:14:37 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:14:37 +0200 |
commit | 8bf668665b107469086f16cb8ad23e47d479d2b4 (patch) | |
tree | 66a91ef06a8caa7cd6819dcbe1860693d3eda8d5 /comparison.h | |
parent | 3.21 (diff) | |
download | FreeFileSync-8bf668665b107469086f16cb8ad23e47d479d2b4.tar.gz FreeFileSync-8bf668665b107469086f16cb8ad23e47d479d2b4.tar.bz2 FreeFileSync-8bf668665b107469086f16cb8ad23e47d479d2b4.zip |
4.0
Diffstat (limited to 'comparison.h')
-rw-r--r-- | comparison.h | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/comparison.h b/comparison.h index 2d1eab75..225a82e8 100644 --- a/comparison.h +++ b/comparison.h @@ -22,20 +22,26 @@ struct FolderPairCfg { FolderPairCfg(const Zstring& leftDir, //must be formatted folder pairs! const Zstring& rightDir, - const NormalizedFilter& filterIn, + CompareVariant cmpVar, SymLinkHandling handleSymlinksIn, - const SyncConfig& syncCfg) : + const NormalizedFilter& filterIn, + const DirectionConfig& directCfg) : leftDirectoryFmt(leftDir), rightDirectoryFmt(rightDir), - filter(filterIn), + compareVar(cmpVar), handleSymlinks(handleSymlinksIn), - syncConfiguration(syncCfg) {} + filter(filterIn), + directionCfg(directCfg) {} Zstring leftDirectoryFmt; //resolved folder pairs!!! Zstring rightDirectoryFmt; // - NormalizedFilter filter; + + CompareVariant compareVar; SymLinkHandling handleSymlinks; - SyncConfig syncConfiguration; + + NormalizedFilter filter; + + DirectionConfig directionCfg; }; std::vector<FolderPairCfg> extractCompareCfg(const MainConfiguration& mainCfg); //fill FolderPairCfg and resolve folder pairs @@ -49,25 +55,25 @@ public: xmlAccess::OptionalDialogs& warnings, ProcessCallback& handler); - void startCompareProcess(const std::vector<FolderPairCfg>& directoryPairs, - const CompareVariant cmpVar, - FolderComparison& output); - ~CompareProcess(); + void startCompareProcess(const std::vector<FolderPairCfg>& cfgList, FolderComparison& output); private: - void compareByTimeSize(const std::vector<FolderPairCfg>& directoryPairsFormatted, FolderComparison& output); - void compareByContent( const std::vector<FolderPairCfg>& directoryPairsFormatted, FolderComparison& output); + CompareProcess(const CompareProcess&); + CompareProcess& operator=(const CompareProcess&); //create comparison result table and fill category except for files existing on both sides: undefinedFiles and undefinedLinks are appended! void categorizeSymlinkByTime(SymLinkMapping& linkObj) const; void categorizeSymlinkByContent(SymLinkMapping& linkObj) const; + void compareByTimeSize(const FolderPairCfg& fpConfig, BaseDirMapping& output); + void compareByContent(std::vector<std::pair<FolderPairCfg, BaseDirMapping*>>& workLoad); + void performComparison(const FolderPairCfg& fpCfg, BaseDirMapping& output, std::vector<FileMapping*>& undefinedFiles, std::vector<SymLinkMapping*>& undefinedLinks); - std::map<DirectoryKey, DirectoryValue> directoryBuffer; + std::map<DirectoryKey, DirectoryValue> directoryBuffer; //contains only *existing* directories const size_t fileTimeTolerance; //max allowed file time deviation |