summaryrefslogtreecommitdiff
path: root/comparison.h
blob: a5705238ccb367aa84589694c07c50a35ed33355 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef COMPARISON_H_INCLUDED
#define COMPARISON_H_INCLUDED

#include "FreeFileSync.h"
#include "library/statusHandler.h"


namespace FreeFileSync
{
    bool foldersAreValidForComparison(const vector<FolderPair>& folderPairs, wxString& errorMessage);
    bool foldersHaveDependencies(const vector<FolderPair>& folderPairs, wxString& warningMessage);

    //class handling comparison process
    class CompareProcess
    {
    public:
        CompareProcess(bool lineBreakOnMessages, StatusHandler* handler);

        void startCompareProcess(const vector<FolderPair>& directoryPairsFormatted,
                                 const CompareVariant cmpVar,
                                 FileCompareResult& output) throw(AbortThisProcess);

    private:
        //create comparison result table and fill relation except for files existing on both sides
        void performBaseComparison(const vector<FolderPair>& directoryPairsFormatted,
                                   FileCompareResult& output);

        StatusHandler* statusUpdater;
        wxString optionalLineBreak; //optional line break for status messages (used by GUI mode only)

        const Zstring txtComparingContentOfFiles;
    };
}

#endif // COMPARISON_H_INCLUDED
bgstack15