From 88c8801298cbf6fec9cdce254c7b3cb9e066a421 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:09:45 +0200 Subject: 3.13 --- synchronization.h | 102 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 97 insertions(+), 5 deletions(-) (limited to 'synchronization.h') diff --git a/synchronization.h b/synchronization.h index afa36dff..d83315f4 100644 --- a/synchronization.h +++ b/synchronization.h @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de) * +// * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** // #ifndef SYNCHRONIZATION_H_INCLUDED @@ -22,10 +22,16 @@ public: SyncStatistics(const HierarchyObject& hierObj); SyncStatistics(const FolderComparison& folderCmp); - int getCreate( bool inclLeft = true, bool inclRight = true) const; - int getOverwrite(bool inclLeft = true, bool inclRight = true) const; - int getDelete( bool inclLeft = true, bool inclRight = true) const; - int getConflict() const; + int getCreate() const; + template int getCreate() const; + + int getOverwrite() const; + template int getOverwrite() const; + + int getDelete() const; + template int getDelete() const; + + int getConflict() const; typedef std::vector > ConflictTexts; // Pair(filename/conflict text) const ConflictTexts& getFirstConflicts() const; //get first few sync conflicts @@ -94,6 +100,92 @@ private: StatusHandler& statusUpdater; }; + + + + + + + + + + + + + + + + + + + + + + + + + +// inline implementation +template <> +inline +int SyncStatistics::getCreate() const +{ + return createLeft; +} + +template <> +inline +int SyncStatistics::getCreate() const +{ + return createRight; +} + +inline +int SyncStatistics::getCreate() const +{ + return getCreate() + getCreate(); +} + +template <> +inline +int SyncStatistics::getOverwrite() const +{ + return overwriteLeft; +} + +template <> +inline +int SyncStatistics::getOverwrite() const +{ + return overwriteRight; +} + +inline +int SyncStatistics::getOverwrite() const +{ + return getOverwrite() + getOverwrite(); +} + + +template <> +inline +int SyncStatistics::getDelete() const +{ + return deleteLeft; +} + +template <> +inline +int SyncStatistics::getDelete() const +{ + return deleteRight; +} + +inline +int SyncStatistics::getDelete() const +{ + return getDelete() + getDelete(); +} } #endif // SYNCHRONIZATION_H_INCLUDED -- cgit