Index: src/ch/FeedbackHandler.h =================================================================== diff -u -r458af7bf8c35950fdeb4b906950437596324aea1 -r7d59ab9183c933f2fc2682a95fb5d26cf2f952d7 --- src/ch/FeedbackHandler.h (.../FeedbackHandler.h) (revision 458af7bf8c35950fdeb4b906950437596324aea1) +++ src/ch/FeedbackHandler.h (.../FeedbackHandler.h) (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -28,7 +28,7 @@ virtual ~CFeedbackHandler(); public: - virtual ull_t RequestFeedback(ull_t ullFeedbackID, ptr_t pFeedbackParam); + virtual ull_t RequestFeedback(ull_t ullFeedbackID, ptr_t pFeedbackParam) override; protected: EFeedbackResult m_aeFeedbackTypeStatus[eFT_LastType]; @@ -45,7 +45,7 @@ virtual ~CFeedbackHandlerFactory(); public: - chcore::IFeedbackHandlerPtr Create(); + virtual chcore::IFeedbackHandlerPtr Create() override; }; typedef boost::shared_ptr CFeedbackHandlerFactoryPtr; Index: src/libchcore/IFeedbackHandler.h =================================================================== diff -u -r04a9f2496d5931c7e06ff815fb8d0e3eabaf2cf2 -r7d59ab9183c933f2fc2682a95fb5d26cf2f952d7 --- src/libchcore/IFeedbackHandler.h (.../IFeedbackHandler.h) (revision 04a9f2496d5931c7e06ff815fb8d0e3eabaf2cf2) +++ src/libchcore/IFeedbackHandler.h (.../IFeedbackHandler.h) (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -90,7 +90,7 @@ public: virtual ~IFeedbackHandler(); - virtual ull_t RequestFeedback(ull_t ullFeedbackID, ptr_t pFeedbackParam) = 0; + virtual unsigned long long RequestFeedback(unsigned long long ullFeedbackID, void* pFeedbackParam) = 0; }; typedef boost::shared_ptr IFeedbackHandlerPtr; Index: src/libchcore/IRunningTimeControl.cpp =================================================================== diff -u --- src/libchcore/IRunningTimeControl.cpp (revision 0) +++ src/libchcore/IRunningTimeControl.cpp (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -0,0 +1,28 @@ +// ============================================================================ +// Copyright (C) 2001-2015 by Jozef Starosczyk +// ixen@copyhandler.com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ +#include "stdafx.h" +#include "IRunningTimeControl.h" + +BEGIN_CHCORE_NAMESPACE + +IRunningTimeControl::~IRunningTimeControl() +{ +} + +END_CHCORE_NAMESPACE Index: src/libchcore/IRunningTimeControl.h =================================================================== diff -u --- src/libchcore/IRunningTimeControl.h (revision 0) +++ src/libchcore/IRunningTimeControl.h (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -0,0 +1,42 @@ +// ============================================================================ +// Copyright (C) 2001-2015 by Jozef Starosczyk +// ixen@copyhandler.com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ +#ifndef __IRUNNINGTIMESTATS_H__ +#define __IRUNNINGTIMESTATS_H__ + +#include "libchcore.h" + +BEGIN_CHCORE_NAMESPACE + +class IRunningTimeControl +{ +public: + virtual ~IRunningTimeControl(); + + // time tracking + virtual void EnableTimeTracking() = 0; + virtual void DisableTimeTracking() = 0; + + // running/not running state + virtual void MarkAsRunning() = 0; + virtual void MarkAsNotRunning() = 0; +}; + +END_CHCORE_NAMESPACE + +#endif Index: src/libchcore/TFeedbackHandlerWrapper.cpp =================================================================== diff -u --- src/libchcore/TFeedbackHandlerWrapper.cpp (revision 0) +++ src/libchcore/TFeedbackHandlerWrapper.cpp (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -0,0 +1,42 @@ +// ============================================================================ +// Copyright (C) 2001-2015 by Jozef Starosczyk +// ixen@copyhandler.com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ +#include "stdafx.h" +#include "TFeedbackHandlerWrapper.h" +#include "TScopedRunningTimeTrackerPause.h" + +BEGIN_CHCORE_NAMESPACE + +TFeedbackHandlerWrapper::TFeedbackHandlerWrapper(const IFeedbackHandlerPtr& spFeedbackHandler, TScopedRunningTimeTracker& rTimeGuard) : + m_spFeedbackHandler(spFeedbackHandler), + m_rTimeGuard(rTimeGuard) +{ +} + +TFeedbackHandlerWrapper::~TFeedbackHandlerWrapper() +{ +} + +unsigned long long TFeedbackHandlerWrapper::RequestFeedback(unsigned long long ullFeedbackID, void* pFeedbackParam) +{ + TScopedRunningTimeTrackerPause scopedTimePause(m_rTimeGuard); + + return m_spFeedbackHandler->RequestFeedback(ullFeedbackID, pFeedbackParam); +} + +END_CHCORE_NAMESPACE Index: src/libchcore/TFeedbackHandlerWrapper.h =================================================================== diff -u --- src/libchcore/TFeedbackHandlerWrapper.h (revision 0) +++ src/libchcore/TFeedbackHandlerWrapper.h (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -0,0 +1,50 @@ +// ============================================================================ +// Copyright (C) 2001-2015 by Jozef Starosczyk +// ixen@copyhandler.com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ +#ifndef __TFEEDBACKHANDLERWRAPPER_H__ +#define __TFEEDBACKHANDLERWRAPPER_H__ + +#include "libchcore.h" +#include "IFeedbackHandler.h" +#include + +BEGIN_CHCORE_NAMESPACE + +class TScopedRunningTimeTracker; + +class TFeedbackHandlerWrapper : public IFeedbackHandler +{ +public: + TFeedbackHandlerWrapper(const IFeedbackHandlerPtr& spFeedbackHandler, TScopedRunningTimeTracker& rTimeGuard); + virtual ~TFeedbackHandlerWrapper(); + + TFeedbackHandlerWrapper(const TFeedbackHandlerWrapper&) = delete; + TFeedbackHandlerWrapper& operator=(const TFeedbackHandlerWrapper&) = delete; + + virtual unsigned long long RequestFeedback(unsigned long long ullFeedbackID, void* pFeedbackParam) override; + +private: + IFeedbackHandlerPtr m_spFeedbackHandler; + TScopedRunningTimeTracker& m_rTimeGuard; +}; + +typedef boost::shared_ptr TFeedbackHandlerWrapperPtr; + +END_CHCORE_NAMESPACE + +#endif Index: src/libchcore/TScopedRunningTimeTracker.cpp =================================================================== diff -u --- src/libchcore/TScopedRunningTimeTracker.cpp (revision 0) +++ src/libchcore/TScopedRunningTimeTracker.cpp (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -0,0 +1,75 @@ +// ============================================================================ +// Copyright (C) 2001-2015 by Jozef Starosczyk +// ixen@copyhandler.com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ +#include "stdafx.h" +#include "TScopedRunningTimeTracker.h" + +BEGIN_CHCORE_NAMESPACE + +TScopedRunningTimeTracker::TScopedRunningTimeTracker(IRunningTimeControl& rLocalStats) : + m_rLocalStats(rLocalStats), + m_bTimeTrackingPaused(false), + m_bRunningStatePaused(false) +{ + rLocalStats.EnableTimeTracking(); + rLocalStats.MarkAsRunning(); +} + +TScopedRunningTimeTracker::~TScopedRunningTimeTracker() +{ + m_rLocalStats.MarkAsNotRunning(); + m_rLocalStats.DisableTimeTracking(); +} + +void TScopedRunningTimeTracker::PauseTimeTracking() +{ + if (!m_bTimeTrackingPaused) + { + m_rLocalStats.DisableTimeTracking(); + m_bTimeTrackingPaused = true; + } +} + +void TScopedRunningTimeTracker::UnPauseTimeTracking() +{ + if (m_bTimeTrackingPaused) + { + m_rLocalStats.EnableTimeTracking(); + m_bTimeTrackingPaused = false; + } +} + +void TScopedRunningTimeTracker::PauseRunningState() +{ + if (!m_bRunningStatePaused) + { + m_rLocalStats.MarkAsNotRunning(); + m_bRunningStatePaused = true; + } +} + +void TScopedRunningTimeTracker::UnPauseRunningState() +{ + if (m_bRunningStatePaused) + { + m_rLocalStats.MarkAsRunning(); + m_bRunningStatePaused = false; + } +} + +END_CHCORE_NAMESPACE Index: src/libchcore/TScopedRunningTimeTracker.h =================================================================== diff -u --- src/libchcore/TScopedRunningTimeTracker.h (revision 0) +++ src/libchcore/TScopedRunningTimeTracker.h (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -0,0 +1,51 @@ +// ============================================================================ +// Copyright (C) 2001-2015 by Jozef Starosczyk +// ixen@copyhandler.com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ +#ifndef __TSCOPEDRUNNINGTIME_H__ +#define __TSCOPEDRUNNINGTIME_H__ + +#include "libchcore.h" +#include "IRunningTimeControl.h" + +BEGIN_CHCORE_NAMESPACE + +class TScopedRunningTimeTracker +{ +public: + TScopedRunningTimeTracker(IRunningTimeControl& rStats); + ~TScopedRunningTimeTracker(); + + void PauseTimeTracking(); + void UnPauseTimeTracking(); + + void PauseRunningState(); + void UnPauseRunningState(); + +private: + TScopedRunningTimeTracker(const TScopedRunningTimeTracker& rLocalStats) = delete; + TScopedRunningTimeTracker& operator=(const TScopedRunningTimeTracker& rLocalStats) = delete; + +private: + IRunningTimeControl& m_rLocalStats; + bool m_bTimeTrackingPaused; + bool m_bRunningStatePaused; +}; + +END_CHCORE_NAMESPACE + +#endif Index: src/libchcore/TScopedRunningTimeTrackerPause.cpp =================================================================== diff -u --- src/libchcore/TScopedRunningTimeTrackerPause.cpp (revision 0) +++ src/libchcore/TScopedRunningTimeTrackerPause.cpp (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -0,0 +1,36 @@ +// ============================================================================ +// Copyright (C) 2001-2015 by Jozef Starosczyk +// ixen@copyhandler.com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ +#include "stdafx.h" +#include "TScopedRunningTimeTrackerPause.h" +#include "TScopedRunningTimeTracker.h" + +BEGIN_CHCORE_NAMESPACE + +TScopedRunningTimeTrackerPause::TScopedRunningTimeTrackerPause(TScopedRunningTimeTracker& rRunningTimeTracker) : + m_rRunningTimeTracker(rRunningTimeTracker) +{ + m_rRunningTimeTracker.PauseTimeTracking(); +} + +TScopedRunningTimeTrackerPause::~TScopedRunningTimeTrackerPause() +{ + m_rRunningTimeTracker.UnPauseTimeTracking(); +} + +END_CHCORE_NAMESPACE Index: src/libchcore/TScopedRunningTimeTrackerPause.h =================================================================== diff -u --- src/libchcore/TScopedRunningTimeTrackerPause.h (revision 0) +++ src/libchcore/TScopedRunningTimeTrackerPause.h (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -0,0 +1,43 @@ +// ============================================================================ +// Copyright (C) 2001-2015 by Jozef Starosczyk +// ixen@copyhandler.com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ +#ifndef __TSCOPEDRUNNINGTIMETRACKERPAUSE_H__ +#define __TSCOPEDRUNNINGTIMETRACKERPAUSE_H__ + +#include "libchcore.h" + +BEGIN_CHCORE_NAMESPACE + +class TScopedRunningTimeTracker; + +class TScopedRunningTimeTrackerPause +{ +public: + TScopedRunningTimeTrackerPause(TScopedRunningTimeTracker& rRunningTimeTracker); + ~TScopedRunningTimeTrackerPause(); + + TScopedRunningTimeTrackerPause(const TScopedRunningTimeTrackerPause&) = delete; + TScopedRunningTimeTrackerPause& operator=(const TScopedRunningTimeTrackerPause&) = delete; + +private: + TScopedRunningTimeTracker& m_rRunningTimeTracker; +}; + +END_CHCORE_NAMESPACE + +#endif Index: src/libchcore/TSubTaskArray.cpp =================================================================== diff -u -ree9b975618a07beb840aca724732da87b522d54b -r7d59ab9183c933f2fc2682a95fb5d26cf2f952d7 --- src/libchcore/TSubTaskArray.cpp (.../TSubTaskArray.cpp) (revision ee9b975618a07beb840aca724732da87b522d54b) +++ src/libchcore/TSubTaskArray.cpp (.../TSubTaskArray.cpp) (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -41,7 +41,7 @@ // TSubTasksArray TSubTasksArray::TSubTasksArray(TSubTaskContext& rSubTaskContext) : -m_rSubTaskContext(rSubTaskContext), + m_rSubTaskContext(rSubTaskContext), m_eOperationType(m_setModifications, eOperation_None), m_oidSubOperationIndex(0), m_oidLastStoredIndex((object_id_t)-1) @@ -113,7 +113,7 @@ } } -TSubTaskBase::ESubOperationResult TSubTasksArray::Execute(bool bRunOnlyEstimationSubTasks) +TSubTaskBase::ESubOperationResult TSubTasksArray::Execute(const IFeedbackHandlerPtr& spFeedbackHandler, bool bRunOnlyEstimationSubTasks) { TSubTaskBase::ESubOperationResult eResult = TSubTaskBase::eSubResult_Continue; @@ -132,7 +132,7 @@ break; } - eResult = spCurrentSubTask->Exec(); + eResult = spCurrentSubTask->Exec(spFeedbackHandler); if(eResult != TSubTaskBase::eSubResult_Continue) break; Index: src/libchcore/TSubTaskArray.h =================================================================== diff -u -refef4b7b215e689180d0c02a3f7a89f8089bdc8e -r7d59ab9183c933f2fc2682a95fb5d26cf2f952d7 --- src/libchcore/TSubTaskArray.h (.../TSubTaskArray.h) (revision efef4b7b215e689180d0c02a3f7a89f8089bdc8e) +++ src/libchcore/TSubTaskArray.h (.../TSubTaskArray.h) (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -62,7 +62,7 @@ void Store(const ISerializerPtr& spSerializer) const; void Load(const ISerializerPtr& spSerializer); - TSubTaskBase::ESubOperationResult Execute(bool bRunOnlyEstimationSubTasks); + TSubTaskBase::ESubOperationResult Execute(const IFeedbackHandlerPtr& spFeedbackHandler, bool bRunOnlyEstimationSubTasks); private: TSubTasksArray(const TSubTasksArray& rSrc); @@ -102,7 +102,7 @@ mutable object_id_t m_oidLastStoredIndex; - friend class TTaskProcessingGuard; + friend class TScopedRunningTimeTracker; }; END_CHCORE_NAMESPACE Index: src/libchcore/TSubTaskBase.h =================================================================== diff -u -rd76d3ce6c8c55fa23009dbb03b8bc06f482c5b72 -r7d59ab9183c933f2fc2682a95fb5d26cf2f952d7 --- src/libchcore/TSubTaskBase.h (.../TSubTaskBase.h) (revision d76d3ce6c8c55fa23009dbb03b8bc06f482c5b72) +++ src/libchcore/TSubTaskBase.h (.../TSubTaskBase.h) (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -28,6 +28,7 @@ #include "ESubTaskTypes.h" #include "TSubTaskStatsInfo.h" #include "ISerializer.h" +#include "IFeedbackHandler.h" BEGIN_CHCORE_NAMESPACE @@ -56,7 +57,7 @@ virtual void Reset() = 0; - virtual ESubOperationResult Exec() = 0; + virtual ESubOperationResult Exec(const IFeedbackHandlerPtr& spFeedbackHandler) = 0; virtual ESubOperationType GetSubOperationType() const = 0; // serialization Index: src/libchcore/TSubTaskContext.cpp =================================================================== diff -u -r121d674474766192b5bf02afda67fb962635f56b -r7d59ab9183c933f2fc2682a95fb5d26cf2f952d7 --- src/libchcore/TSubTaskContext.cpp (.../TSubTaskContext.cpp) (revision 121d674474766192b5bf02afda67fb962635f56b) +++ src/libchcore/TSubTaskContext.cpp (.../TSubTaskContext.cpp) (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -30,15 +30,14 @@ TSubTaskContext::TSubTaskContext(TConfig& rConfig, const TBasePathDataContainerPtr& spBasePaths, const TFileFiltersArray& rFilters, - TTaskConfigTracker& rCfgTracker, icpf::log_file& rLog, const IFeedbackHandlerPtr& spFeedbackHandler, + TTaskConfigTracker& rCfgTracker, icpf::log_file& rLog, TWorkerThreadController& rThreadController, TLocalFilesystem& rfsLocal) : m_rConfig(rConfig), m_eOperationType(eOperation_None), m_spBasePaths(spBasePaths), m_pathDestination(), m_rCfgTracker(rCfgTracker), m_rLog(rLog), - m_spFeedbackHandler(spFeedbackHandler), m_rThreadController(rThreadController), m_rfsLocal(rfsLocal), m_rFilters(rFilters) @@ -114,14 +113,6 @@ return m_rLog; } -chcore::IFeedbackHandlerPtr TSubTaskContext::GetFeedbackHandler() -{ - if(!m_spFeedbackHandler) - THROW_CORE_EXCEPTION(eErr_InvalidPointer); - - return m_spFeedbackHandler; -} - TWorkerThreadController& TSubTaskContext::GetThreadController() { return m_rThreadController; Index: src/libchcore/TSubTaskContext.h =================================================================== diff -u -r121d674474766192b5bf02afda67fb962635f56b -r7d59ab9183c933f2fc2682a95fb5d26cf2f952d7 --- src/libchcore/TSubTaskContext.h (.../TSubTaskContext.h) (revision 121d674474766192b5bf02afda67fb962635f56b) +++ src/libchcore/TSubTaskContext.h (.../TSubTaskContext.h) (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -51,7 +51,7 @@ public: TSubTaskContext(TConfig& rConfig, const TBasePathDataContainerPtr& spBasePaths, const TFileFiltersArray& rFilters, - TTaskConfigTracker& rCfgTracker, icpf::log_file& rLog, const IFeedbackHandlerPtr& spFeedbackHandler, + TTaskConfigTracker& rCfgTracker, icpf::log_file& rLog, TWorkerThreadController& rThreadController, TLocalFilesystem& rfsLocal); ~TSubTaskContext(); @@ -76,8 +76,6 @@ icpf::log_file& GetLog(); const icpf::log_file& GetLog() const; - IFeedbackHandlerPtr GetFeedbackHandler(); - TWorkerThreadController& GetThreadController(); const TWorkerThreadController& GetThreadController() const; @@ -115,12 +113,6 @@ // additional data icpf::log_file& m_rLog; - // feedback handling -#pragma warning(push) -#pragma warning(disable: 4251) - IFeedbackHandlerPtr m_spFeedbackHandler; -#pragma warning(pop) - // thread control TWorkerThreadController& m_rThreadController; }; Index: src/libchcore/TSubTaskCopyMove.cpp =================================================================== diff -u -r79399818d01f20d3a83766543e98ef5f0ee3de38 -r7d59ab9183c933f2fc2682a95fb5d26cf2f952d7 --- src/libchcore/TSubTaskCopyMove.cpp (.../TSubTaskCopyMove.cpp) (revision 79399818d01f20d3a83766543e98ef5f0ee3de38) +++ src/libchcore/TSubTaskCopyMove.cpp (.../TSubTaskCopyMove.cpp) (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -40,6 +40,8 @@ #include "ErrorCodes.h" #include "TCoreException.h" #include "TPathContainer.h" +#include "TScopedRunningTimeTracker.h" +#include "TFeedbackHandlerWrapper.h" BEGIN_CHCORE_NAMESPACE @@ -71,15 +73,15 @@ m_tSubTaskStats.Clear(); } -TSubTaskBase::ESubOperationResult TSubTaskCopyMove::Exec() +TSubTaskBase::ESubOperationResult TSubTaskCopyMove::Exec(const IFeedbackHandlerPtr& spFeedback) { - TSubTaskProcessingGuard guard(m_tSubTaskStats); + TScopedRunningTimeTracker guard(m_tSubTaskStats); + TFeedbackHandlerWrapperPtr spFeedbackHandler(boost::make_shared(spFeedback, guard)); icpf::log_file& rLog = GetContext().GetLog(); TFileInfoArray& rFilesCache = GetContext().GetFilesCache(); TTaskConfigTracker& rCfgTracker = GetContext().GetCfgTracker(); TWorkerThreadController& rThreadController = GetContext().GetThreadController(); - IFeedbackHandlerPtr spFeedbackHandler = GetContext().GetFeedbackHandler(); const TConfig& rConfig = GetContext().GetConfig(); TSmartPath pathDestination = GetContext().GetDestinationPath(); @@ -94,7 +96,7 @@ } // now it's time to check if there is enough space on destination device - TSubTaskBase::ESubOperationResult eResult = CheckForFreeSpaceFB(); + TSubTaskBase::ESubOperationResult eResult = CheckForFreeSpaceFB(spFeedbackHandler); if(eResult != TSubTaskBase::eSubResult_Continue) return eResult; @@ -161,7 +163,7 @@ // if folder - create it if(spFileInfo->IsDirectory()) { - TSubTaskBase::ESubOperationResult eResult = CreateDirectoryFB(ccp.pathDstFile); + TSubTaskBase::ESubOperationResult eResult = CreateDirectoryFB(spFeedbackHandler, ccp.pathDstFile); if(eResult != TSubTaskBase::eSubResult_Continue) return eResult; @@ -178,7 +180,7 @@ ccp.bProcessed = false; // copy data - TSubTaskBase::ESubOperationResult eResult = CustomCopyFileFB(&ccp); + TSubTaskBase::ESubOperationResult eResult = CustomCopyFileFB(spFeedbackHandler, &ccp); if(eResult != TSubTaskBase::eSubResult_Continue) return eResult; @@ -258,7 +260,7 @@ } } -TSubTaskBase::ESubOperationResult TSubTaskCopyMove::CustomCopyFileFB(CUSTOM_COPY_PARAMS* pData) +TSubTaskBase::ESubOperationResult TSubTaskCopyMove::CustomCopyFileFB(const IFeedbackHandlerPtr& spFeedbackHandler, CUSTOM_COPY_PARAMS* pData) { TWorkerThreadController& rThreadController = GetContext().GetThreadController(); icpf::log_file& rLog = GetContext().GetLog(); @@ -278,7 +280,7 @@ pData->spSrcFile->GetLength64() >= GetTaskPropValue(rConfig)); bool bSkip = false; - eResult = OpenSrcAndDstFilesFB(pData, fileSrc, fileDst, bNoBuffer, bSkip); + eResult = OpenSrcAndDstFilesFB(spFeedbackHandler, pData, fileSrc, fileDst, bNoBuffer, bSkip); if(eResult != TSubTaskBase::eSubResult_Continue) return eResult; else if(bSkip) @@ -338,7 +340,7 @@ spBuffer = listEmptyBuffers.back(); listEmptyBuffers.pop_back(); - eResult = ReadFileFB(fileSrc, *spBuffer.get(), boost::numeric_cast(pData->dbBuffer.GetSimpleBufferSize()), ulRead, pData->spSrcFile->GetFullFilePath(), bSkip); + eResult = ReadFileFB(spFeedbackHandler, fileSrc, *spBuffer.get(), boost::numeric_cast(pData->dbBuffer.GetSimpleBufferSize()), ulRead, pData->spSrcFile->GetFullFilePath(), bSkip); if(eResult != TSubTaskBase::eSubResult_Continue) return eResult; else if(bSkip) @@ -368,7 +370,7 @@ TSimpleDataBufferPtr spBuffer = listDataBuffers.front(); listDataBuffers.pop_front(); - eResult = WriteFileExFB(fileDst, *spBuffer.get(), boost::numeric_cast(spBuffer->GetDataSize()), ulWritten, pData->pathDstFile, bSkip, bNoBuffer); + eResult = WriteFileExFB(spFeedbackHandler, fileDst, *spBuffer.get(), boost::numeric_cast(spBuffer->GetDataSize()), ulWritten, pData->pathDstFile, bSkip, bNoBuffer); if(eResult != TSubTaskBase::eSubResult_Continue) return eResult; else if(bSkip) @@ -417,14 +419,14 @@ return TSubTaskBase::eSubResult_Continue; } -TSubTaskCopyMove::ESubOperationResult TSubTaskCopyMove::OpenSrcAndDstFilesFB(CUSTOM_COPY_PARAMS* pData, TLocalFilesystemFile &fileSrc, TLocalFilesystemFile &fileDst, bool bNoBuffer, bool& bSkip) +TSubTaskCopyMove::ESubOperationResult TSubTaskCopyMove::OpenSrcAndDstFilesFB(const IFeedbackHandlerPtr& spFeedbackHandler, CUSTOM_COPY_PARAMS* pData, TLocalFilesystemFile &fileSrc, TLocalFilesystemFile &fileDst, bool bNoBuffer, bool& bSkip) { const TConfig& rConfig = GetContext().GetConfig(); bSkip = false; // first open the source file and handle any failures - TSubTaskCopyMove::ESubOperationResult eResult = OpenSourceFileFB(fileSrc, pData->spSrcFile->GetFullFilePath(), bNoBuffer); + TSubTaskCopyMove::ESubOperationResult eResult = OpenSourceFileFB(spFeedbackHandler, fileSrc, pData->spSrcFile->GetFullFilePath(), bNoBuffer); if(eResult != TSubTaskBase::eSubResult_Continue) return eResult; else if(!fileSrc.IsOpen()) @@ -478,7 +480,7 @@ { // open destination file for case, when we start operation on this file (i.e. it is not resume of the // old operation) - eResult = OpenDestinationFileFB(fileDst, pData->pathDstFile, bNoBuffer, pData->spSrcFile, ullSeekTo, bDstFileFreshlyCreated); + eResult = OpenDestinationFileFB(spFeedbackHandler, fileDst, pData->pathDstFile, bNoBuffer, pData->spSrcFile, ullSeekTo, bDstFileFreshlyCreated); if(eResult != TSubTaskBase::eSubResult_Continue) return eResult; else if(!fileDst.IsOpen()) @@ -496,7 +498,7 @@ else { // we are resuming previous operation - eResult = OpenExistingDestinationFileFB(fileDst, pData->pathDstFile, bNoBuffer); + eResult = OpenExistingDestinationFileFB(spFeedbackHandler, fileDst, pData->pathDstFile, bNoBuffer); if(eResult != TSubTaskBase::eSubResult_Continue) return eResult; else if(!fileDst.IsOpen()) @@ -529,7 +531,7 @@ // try to move file pointers to the end ULONGLONG ullMove = (bNoBuffer ? ROUNDDOWN(ullSeekTo, MAXSECTORSIZE) : ullSeekTo); - eResult = SetFilePointerFB(fileSrc, ullMove, pData->spSrcFile->GetFullFilePath(), bSkip); + eResult = SetFilePointerFB(spFeedbackHandler, fileSrc, ullMove, pData->spSrcFile->GetFullFilePath(), bSkip); if(eResult != TSubTaskBase::eSubResult_Continue) return eResult; else if(bSkip) @@ -543,7 +545,7 @@ return TSubTaskBase::eSubResult_Continue; } - eResult = SetFilePointerFB(fileDst, ullMove, pData->pathDstFile, bSkip); + eResult = SetFilePointerFB(spFeedbackHandler, fileDst, ullMove, pData->pathDstFile, bSkip); if(eResult != TSubTaskBase::eSubResult_Continue) return eResult; else if(bSkip) @@ -577,7 +579,7 @@ if(!bDstFileFreshlyCreated) { // if destination file was opened (as opposed to newly created) - eResult = SetEndOfFileFB(fileDst, pData->pathDstFile, bSkip); + eResult = SetEndOfFileFB(spFeedbackHandler, fileDst, pData->pathDstFile, bSkip); if(eResult != TSubTaskBase::eSubResult_Continue) return eResult; else if(bSkip) @@ -645,9 +647,8 @@ return false; } -TSubTaskBase::ESubOperationResult TSubTaskCopyMove::OpenSourceFileFB(TLocalFilesystemFile& fileSrc, const TSmartPath& spPathToOpen, bool bNoBuffering) +TSubTaskBase::ESubOperationResult TSubTaskCopyMove::OpenSourceFileFB(const IFeedbackHandlerPtr& spFeedbackHandler, TLocalFilesystemFile& fileSrc, const TSmartPath& spPathToOpen, bool bNoBuffering) { - IFeedbackHandlerPtr spFeedbackHandler = GetContext().GetFeedbackHandler(); icpf::log_file& rLog = GetContext().GetLog(); BOOST_ASSERT(!spPathToOpen.IsEmpty()); @@ -711,9 +712,8 @@ return TSubTaskBase::eSubResult_Continue; } -TSubTaskBase::ESubOperationResult TSubTaskCopyMove::OpenDestinationFileFB(TLocalFilesystemFile& fileDst, const TSmartPath& pathDstFile, bool bNoBuffering, const TFileInfoPtr& spSrcFileInfo, unsigned long long& ullSeekTo, bool& bFreshlyCreated) +TSubTaskBase::ESubOperationResult TSubTaskCopyMove::OpenDestinationFileFB(const IFeedbackHandlerPtr& spFeedbackHandler, TLocalFilesystemFile& fileDst, const TSmartPath& pathDstFile, bool bNoBuffering, const TFileInfoPtr& spSrcFileInfo, unsigned long long& ullSeekTo, bool& bFreshlyCreated) { - IFeedbackHandlerPtr spFeedbackHandler = GetContext().GetFeedbackHandler(); icpf::log_file& rLog = GetContext().GetLog(); bool bRetry = false; @@ -734,7 +734,7 @@ bFreshlyCreated = false; // pass it to the specialized method - TSubTaskBase::ESubOperationResult eResult = OpenExistingDestinationFileFB(fileDst, pathDstFile, bNoBuffering); + TSubTaskBase::ESubOperationResult eResult = OpenExistingDestinationFileFB(spFeedbackHandler, fileDst, pathDstFile, bNoBuffering); if(eResult != TSubTaskBase::eSubResult_Continue) return eResult; else if(!fileDst.IsOpen()) @@ -830,9 +830,8 @@ return TSubTaskBase::eSubResult_Continue; } -TSubTaskBase::ESubOperationResult TSubTaskCopyMove::OpenExistingDestinationFileFB(TLocalFilesystemFile& fileDst, const TSmartPath& pathDstFile, bool bNoBuffering) +TSubTaskBase::ESubOperationResult TSubTaskCopyMove::OpenExistingDestinationFileFB(const IFeedbackHandlerPtr& spFeedbackHandler, TLocalFilesystemFile& fileDst, const TSmartPath& pathDstFile, bool bNoBuffering) { - IFeedbackHandlerPtr spFeedbackHandler = GetContext().GetFeedbackHandler(); icpf::log_file& rLog = GetContext().GetLog(); bool bRetry = false; @@ -890,9 +889,8 @@ return TSubTaskBase::eSubResult_Continue; } -TSubTaskBase::ESubOperationResult TSubTaskCopyMove::SetFilePointerFB(TLocalFilesystemFile& file, long long llDistance, const TSmartPath& pathFile, bool& bSkip) +TSubTaskBase::ESubOperationResult TSubTaskCopyMove::SetFilePointerFB(const IFeedbackHandlerPtr& spFeedbackHandler, TLocalFilesystemFile& file, long long llDistance, const TSmartPath& pathFile, bool& bSkip) { - IFeedbackHandlerPtr spFeedbackHandler = GetContext().GetFeedbackHandler(); icpf::log_file& rLog = GetContext().GetLog(); bSkip = false; @@ -941,9 +939,8 @@ return TSubTaskBase::eSubResult_Continue; } -TSubTaskBase::ESubOperationResult TSubTaskCopyMove::SetEndOfFileFB(TLocalFilesystemFile& file, const TSmartPath& pathFile, bool& bSkip) +TSubTaskBase::ESubOperationResult TSubTaskCopyMove::SetEndOfFileFB(const IFeedbackHandlerPtr& spFeedbackHandler, TLocalFilesystemFile& file, const TSmartPath& pathFile, bool& bSkip) { - IFeedbackHandlerPtr spFeedbackHandler = GetContext().GetFeedbackHandler(); icpf::log_file& rLog = GetContext().GetLog(); bSkip = false; @@ -989,9 +986,8 @@ return TSubTaskBase::eSubResult_Continue; } -TSubTaskBase::ESubOperationResult TSubTaskCopyMove::ReadFileFB(TLocalFilesystemFile& file, chcore::TSimpleDataBuffer& rBuffer, DWORD dwToRead, DWORD& rdwBytesRead, const TSmartPath& pathFile, bool& bSkip) +TSubTaskBase::ESubOperationResult TSubTaskCopyMove::ReadFileFB(const IFeedbackHandlerPtr& spFeedbackHandler, TLocalFilesystemFile& file, chcore::TSimpleDataBuffer& rBuffer, DWORD dwToRead, DWORD& rdwBytesRead, const TSmartPath& pathFile, bool& bSkip) { - IFeedbackHandlerPtr spFeedbackHandler = GetContext().GetFeedbackHandler(); icpf::log_file& rLog = GetContext().GetLog(); bSkip = false; @@ -1040,9 +1036,8 @@ return TSubTaskBase::eSubResult_Continue; } -TSubTaskBase::ESubOperationResult TSubTaskCopyMove::WriteFileFB(TLocalFilesystemFile& file, chcore::TSimpleDataBuffer& rBuffer, DWORD dwToWrite, DWORD& rdwBytesWritten, const TSmartPath& pathFile, bool& bSkip) +TSubTaskBase::ESubOperationResult TSubTaskCopyMove::WriteFileFB(const IFeedbackHandlerPtr& spFeedbackHandler, TLocalFilesystemFile& file, chcore::TSimpleDataBuffer& rBuffer, DWORD dwToWrite, DWORD& rdwBytesWritten, const TSmartPath& pathFile, bool& bSkip) { - IFeedbackHandlerPtr spFeedbackHandler = GetContext().GetFeedbackHandler(); icpf::log_file& rLog = GetContext().GetLog(); bSkip = false; @@ -1092,7 +1087,7 @@ return TSubTaskBase::eSubResult_Continue; } -TSubTaskBase::ESubOperationResult TSubTaskCopyMove::WriteFileExFB(TLocalFilesystemFile& file, chcore::TSimpleDataBuffer& rBuffer, DWORD dwToWrite, DWORD& rdwBytesWritten, const TSmartPath& pathFile, bool& bSkip, bool bNoBuffer) +TSubTaskBase::ESubOperationResult TSubTaskCopyMove::WriteFileExFB(const IFeedbackHandlerPtr& spFeedbackHandler, TLocalFilesystemFile& file, chcore::TSimpleDataBuffer& rBuffer, DWORD dwToWrite, DWORD& rdwBytesWritten, const TSmartPath& pathFile, bool& bSkip, bool bNoBuffer) { TString strFormat; TSubTaskBase::ESubOperationResult eResult = TSubTaskBase::eSubResult_Continue; @@ -1114,7 +1109,7 @@ unsigned long ulDataToWrite = ROUNDDOWN(dwToWrite, MAXSECTORSIZE); if(ulDataToWrite > 0) { - eResult = WriteFileFB(file, rBuffer, ulDataToWrite, ulWritten, pathFile, bSkip); + eResult = WriteFileFB(spFeedbackHandler, file, rBuffer, ulDataToWrite, ulWritten, pathFile, bSkip); if(eResult != TSubTaskBase::eSubResult_Continue || bSkip) return eResult; @@ -1133,12 +1128,12 @@ if(dwToWrite != 0) { // re-open the destination file, this time with standard buffering to allow writing not aligned part of file data - eResult = OpenExistingDestinationFileFB(file, pathFile, false); + eResult = OpenExistingDestinationFileFB(spFeedbackHandler, file, pathFile, false); if(eResult != TSubTaskBase::eSubResult_Continue || !file.IsOpen()) return eResult; // move file pointer to the end of destination file - eResult = SetFilePointerFB(file, m_tSubTaskStats.GetCurrentItemProcessedSize() + rdwBytesWritten, pathFile, bSkip); + eResult = SetFilePointerFB(spFeedbackHandler, file, m_tSubTaskStats.GetCurrentItemProcessedSize() + rdwBytesWritten, pathFile, bSkip); if(eResult != TSubTaskBase::eSubResult_Continue || bSkip) return eResult; } @@ -1147,7 +1142,7 @@ // write if(dwToWrite != 0) { - eResult = WriteFileFB(file, rBuffer, dwToWrite, ulWritten, pathFile, bSkip); + eResult = WriteFileFB(spFeedbackHandler, file, rBuffer, dwToWrite, ulWritten, pathFile, bSkip); if(eResult != TSubTaskBase::eSubResult_Continue || bSkip) return eResult; @@ -1157,10 +1152,9 @@ return TSubTaskBase::eSubResult_Continue; } -TSubTaskBase::ESubOperationResult TSubTaskCopyMove::CreateDirectoryFB(const TSmartPath& pathDirectory) +TSubTaskBase::ESubOperationResult TSubTaskCopyMove::CreateDirectoryFB(const IFeedbackHandlerPtr& spFeedbackHandler, const TSmartPath& pathDirectory) { icpf::log_file& rLog = GetContext().GetLog(); - IFeedbackHandlerPtr spFeedbackHandler = GetContext().GetFeedbackHandler(); bool bRetry = true; DWORD dwLastError = ERROR_SUCCESS; @@ -1200,10 +1194,9 @@ return TSubTaskBase::eSubResult_Continue; } -TSubTaskBase::ESubOperationResult TSubTaskCopyMove::CheckForFreeSpaceFB() +TSubTaskBase::ESubOperationResult TSubTaskCopyMove::CheckForFreeSpaceFB(const IFeedbackHandlerPtr& spFeedbackHandler) { icpf::log_file& rLog = GetContext().GetLog(); - IFeedbackHandlerPtr spFeedbackHandler = GetContext().GetFeedbackHandler(); TLocalFilesystem& rLocalFilesystem = GetContext().GetLocalFilesystem(); TFileInfoArray& rFilesCache = GetContext().GetFilesCache(); TBasePathDataContainerPtr spSrcPaths = GetContext().GetBasePaths(); Index: src/libchcore/TSubTaskCopyMove.h =================================================================== diff -u -rd76d3ce6c8c55fa23009dbb03b8bc06f482c5b72 -r7d59ab9183c933f2fc2682a95fb5d26cf2f952d7 --- src/libchcore/TSubTaskCopyMove.h (.../TSubTaskCopyMove.h) (revision d76d3ce6c8c55fa23009dbb03b8bc06f482c5b72) +++ src/libchcore/TSubTaskCopyMove.h (.../TSubTaskCopyMove.h) (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -45,8 +45,8 @@ virtual void Reset(); - virtual ESubOperationResult Exec(); - virtual ESubOperationType GetSubOperationType() const { return eSubOperation_Copying; } + virtual ESubOperationResult Exec(const IFeedbackHandlerPtr& spFeedbackHandler) override; + virtual ESubOperationType GetSubOperationType() const override { return eSubOperation_Copying; } virtual void Store(const ISerializerPtr& spSerializer) const; virtual void Load(const ISerializerPtr& spSerializer); @@ -59,23 +59,23 @@ TBufferSizes::EBufferType GetBufferIndex(const TBufferSizes& rBufferSizes, const TFileInfoPtr& spFileInfo); bool AdjustBufferIfNeeded(TDataBufferManager& rBuffer, TBufferSizes& rBufferSizes); - ESubOperationResult CustomCopyFileFB(CUSTOM_COPY_PARAMS* pData); + ESubOperationResult CustomCopyFileFB(const IFeedbackHandlerPtr& spFeedbackHandler, CUSTOM_COPY_PARAMS* pData); - ESubOperationResult OpenSrcAndDstFilesFB(CUSTOM_COPY_PARAMS* pData, TLocalFilesystemFile &fileSrc, TLocalFilesystemFile &fileDst, bool bNoBuffer, bool& bSkip); + ESubOperationResult OpenSrcAndDstFilesFB(const IFeedbackHandlerPtr& spFeedbackHandler, CUSTOM_COPY_PARAMS* pData, TLocalFilesystemFile &fileSrc, TLocalFilesystemFile &fileDst, bool bNoBuffer, bool& bSkip); - ESubOperationResult OpenSourceFileFB(TLocalFilesystemFile& fileSrc, const TSmartPath& spPathToOpen, bool bNoBuffering); - ESubOperationResult OpenDestinationFileFB(TLocalFilesystemFile& fileDst, const TSmartPath& pathDstFile, bool bNoBuffering, const TFileInfoPtr& spSrcFileInfo, unsigned long long& ullSeekTo, bool& bFreshlyCreated); - ESubOperationResult OpenExistingDestinationFileFB(TLocalFilesystemFile& fileDst, const TSmartPath& pathDstFilePath, bool bNoBuffering); + ESubOperationResult OpenSourceFileFB(const IFeedbackHandlerPtr& spFeedbackHandler, TLocalFilesystemFile& fileSrc, const TSmartPath& spPathToOpen, bool bNoBuffering); + ESubOperationResult OpenDestinationFileFB(const IFeedbackHandlerPtr& spFeedbackHandler, TLocalFilesystemFile& fileDst, const TSmartPath& pathDstFile, bool bNoBuffering, const TFileInfoPtr& spSrcFileInfo, unsigned long long& ullSeekTo, bool& bFreshlyCreated); + ESubOperationResult OpenExistingDestinationFileFB(const IFeedbackHandlerPtr& spFeedbackHandler, TLocalFilesystemFile& fileDst, const TSmartPath& pathDstFilePath, bool bNoBuffering); - ESubOperationResult SetFilePointerFB(TLocalFilesystemFile& file, long long llDistance, const TSmartPath& pathFile, bool& bSkip); - ESubOperationResult SetEndOfFileFB(TLocalFilesystemFile& file, const TSmartPath& pathFile, bool& bSkip); + ESubOperationResult SetFilePointerFB(const IFeedbackHandlerPtr& spFeedbackHandler, TLocalFilesystemFile& file, long long llDistance, const TSmartPath& pathFile, bool& bSkip); + ESubOperationResult SetEndOfFileFB(const IFeedbackHandlerPtr& spFeedbackHandler, TLocalFilesystemFile& file, const TSmartPath& pathFile, bool& bSkip); - ESubOperationResult ReadFileFB(TLocalFilesystemFile& file, chcore::TSimpleDataBuffer& rBuffer, DWORD dwToRead, DWORD& rdwBytesRead, const TSmartPath& pathFile, bool& bSkip); - ESubOperationResult WriteFileFB(TLocalFilesystemFile& file, chcore::TSimpleDataBuffer& rBuffer, DWORD dwToWrite, DWORD& rdwBytesWritten, const TSmartPath& pathFile, bool& bSkip); - ESubOperationResult WriteFileExFB(TLocalFilesystemFile& file, chcore::TSimpleDataBuffer& rBuffer, DWORD dwToWrite, DWORD& rdwBytesWritten, const TSmartPath& pathFile, bool& bSkip, bool bNoBuffer); - ESubOperationResult CreateDirectoryFB(const TSmartPath& pathDirectory); + ESubOperationResult ReadFileFB(const IFeedbackHandlerPtr& spFeedbackHandler, TLocalFilesystemFile& file, chcore::TSimpleDataBuffer& rBuffer, DWORD dwToRead, DWORD& rdwBytesRead, const TSmartPath& pathFile, bool& bSkip); + ESubOperationResult WriteFileFB(const IFeedbackHandlerPtr& spFeedbackHandler, TLocalFilesystemFile& file, chcore::TSimpleDataBuffer& rBuffer, DWORD dwToWrite, DWORD& rdwBytesWritten, const TSmartPath& pathFile, bool& bSkip); + ESubOperationResult WriteFileExFB(const IFeedbackHandlerPtr& spFeedbackHandler, TLocalFilesystemFile& file, chcore::TSimpleDataBuffer& rBuffer, DWORD dwToWrite, DWORD& rdwBytesWritten, const TSmartPath& pathFile, bool& bSkip, bool bNoBuffer); + ESubOperationResult CreateDirectoryFB(const IFeedbackHandlerPtr& spFeedbackHandler, const TSmartPath& pathDirectory); - ESubOperationResult CheckForFreeSpaceFB(); + ESubOperationResult CheckForFreeSpaceFB(const IFeedbackHandlerPtr& spFeedbackHandler); private: #pragma warning(push) Index: src/libchcore/TSubTaskDelete.cpp =================================================================== diff -u -rd76d3ce6c8c55fa23009dbb03b8bc06f482c5b72 -r7d59ab9183c933f2fc2682a95fb5d26cf2f952d7 --- src/libchcore/TSubTaskDelete.cpp (.../TSubTaskDelete.cpp) (revision d76d3ce6c8c55fa23009dbb03b8bc06f482c5b72) +++ src/libchcore/TSubTaskDelete.cpp (.../TSubTaskDelete.cpp) (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -35,6 +35,9 @@ #include "DataBuffer.h" #include "TCoreException.h" #include "ErrorCodes.h" +#include "TScopedRunningTimeTracker.h" +#include "TFeedbackHandlerWrapper.h" +#include BEGIN_CHCORE_NAMESPACE @@ -52,15 +55,15 @@ m_tSubTaskStats.Clear(); } -TSubTaskBase::ESubOperationResult TSubTaskDelete::Exec() +TSubTaskBase::ESubOperationResult TSubTaskDelete::Exec(const IFeedbackHandlerPtr& spFeedback) { - TSubTaskProcessingGuard guard(m_tSubTaskStats); + TScopedRunningTimeTracker guard(m_tSubTaskStats); + TFeedbackHandlerWrapperPtr spFeedbackHandler(boost::make_shared(spFeedback, guard)); // log icpf::log_file& rLog = GetContext().GetLog(); TFileInfoArray& rFilesCache = GetContext().GetFilesCache(); TWorkerThreadController& rThreadController = GetContext().GetThreadController(); - IFeedbackHandlerPtr spFeedbackHandler = GetContext().GetFeedbackHandler(); const TConfig& rConfig = GetContext().GetConfig(); // log Index: src/libchcore/TSubTaskDelete.h =================================================================== diff -u -rd76d3ce6c8c55fa23009dbb03b8bc06f482c5b72 -r7d59ab9183c933f2fc2682a95fb5d26cf2f952d7 --- src/libchcore/TSubTaskDelete.h (.../TSubTaskDelete.h) (revision d76d3ce6c8c55fa23009dbb03b8bc06f482c5b72) +++ src/libchcore/TSubTaskDelete.h (.../TSubTaskDelete.h) (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -38,8 +38,8 @@ virtual void Reset(); - virtual ESubOperationResult Exec(); - virtual ESubOperationType GetSubOperationType() const { return eSubOperation_Deleting; } + virtual ESubOperationResult Exec(const IFeedbackHandlerPtr& spFeedbackHandler) override; + virtual ESubOperationType GetSubOperationType() const override { return eSubOperation_Deleting; } virtual void Store(const ISerializerPtr& spSerializer) const; virtual void Load(const ISerializerPtr& spSerializer); Index: src/libchcore/TSubTaskFastMove.cpp =================================================================== diff -u -rd76d3ce6c8c55fa23009dbb03b8bc06f482c5b72 -r7d59ab9183c933f2fc2682a95fb5d26cf2f952d7 --- src/libchcore/TSubTaskFastMove.cpp (.../TSubTaskFastMove.cpp) (revision d76d3ce6c8c55fa23009dbb03b8bc06f482c5b72) +++ src/libchcore/TSubTaskFastMove.cpp (.../TSubTaskFastMove.cpp) (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -37,6 +37,8 @@ #include "TCoreException.h" #include "ErrorCodes.h" #include "TPathContainer.h" +#include "TScopedRunningTimeTracker.h" +#include "TFeedbackHandlerWrapper.h" BEGIN_CHCORE_NAMESPACE @@ -55,13 +57,13 @@ m_tSubTaskStats.Clear(); } -TSubTaskFastMove::ESubOperationResult TSubTaskFastMove::Exec() +TSubTaskFastMove::ESubOperationResult TSubTaskFastMove::Exec(const IFeedbackHandlerPtr& spFeedback) { - TSubTaskProcessingGuard guard(m_tSubTaskStats); + TScopedRunningTimeTracker guard(m_tSubTaskStats); + TFeedbackHandlerWrapperPtr spFeedbackHandler(boost::make_shared(spFeedback, guard)); // log icpf::log_file& rLog = GetContext().GetLog(); - IFeedbackHandlerPtr spFeedbackHandler = GetContext().GetFeedbackHandler(); TWorkerThreadController& rThreadController = GetContext().GetThreadController(); TBasePathDataContainerPtr spBasePaths = GetContext().GetBasePaths(); const TConfig& rConfig = GetContext().GetConfig(); Index: src/libchcore/TSubTaskFastMove.h =================================================================== diff -u -rd76d3ce6c8c55fa23009dbb03b8bc06f482c5b72 -r7d59ab9183c933f2fc2682a95fb5d26cf2f952d7 --- src/libchcore/TSubTaskFastMove.h (.../TSubTaskFastMove.h) (revision d76d3ce6c8c55fa23009dbb03b8bc06f482c5b72) +++ src/libchcore/TSubTaskFastMove.h (.../TSubTaskFastMove.h) (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -43,8 +43,8 @@ virtual void Reset(); - virtual ESubOperationResult Exec(); - virtual ESubOperationType GetSubOperationType() const { return eSubOperation_FastMove; } + virtual ESubOperationResult Exec(const IFeedbackHandlerPtr& spFeedbackHandler) override; + virtual ESubOperationType GetSubOperationType() const override { return eSubOperation_FastMove; } virtual void Store(const ISerializerPtr& spSerializer) const; virtual void Load(const ISerializerPtr& spSerializer); Index: src/libchcore/TSubTaskScanDirectory.cpp =================================================================== diff -u -rd76d3ce6c8c55fa23009dbb03b8bc06f482c5b72 -r7d59ab9183c933f2fc2682a95fb5d26cf2f952d7 --- src/libchcore/TSubTaskScanDirectory.cpp (.../TSubTaskScanDirectory.cpp) (revision d76d3ce6c8c55fa23009dbb03b8bc06f482c5b72) +++ src/libchcore/TSubTaskScanDirectory.cpp (.../TSubTaskScanDirectory.cpp) (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -37,6 +37,8 @@ #include "TCoreException.h" #include "ErrorCodes.h" #include "TPathContainer.h" +#include "TScopedRunningTimeTracker.h" +#include "TFeedbackHandlerWrapper.h" BEGIN_CHCORE_NAMESPACE @@ -57,14 +59,14 @@ m_tSubTaskStats.Clear(); } -TSubTaskScanDirectories::ESubOperationResult TSubTaskScanDirectories::Exec() +TSubTaskScanDirectories::ESubOperationResult TSubTaskScanDirectories::Exec(const IFeedbackHandlerPtr& spFeedback) { - TSubTaskProcessingGuard guard(m_tSubTaskStats); + TScopedRunningTimeTracker guard(m_tSubTaskStats); + TFeedbackHandlerWrapperPtr spFeedbackHandler(boost::make_shared(spFeedback, guard)); // log icpf::log_file& rLog = GetContext().GetLog(); TFileInfoArray& rFilesCache = GetContext().GetFilesCache(); - IFeedbackHandlerPtr spFeedbackHandler = GetContext().GetFeedbackHandler(); TWorkerThreadController& rThreadController = GetContext().GetThreadController(); TBasePathDataContainerPtr spBasePaths = GetContext().GetBasePaths(); const TConfig& rConfig = GetContext().GetConfig(); Index: src/libchcore/TSubTaskScanDirectory.h =================================================================== diff -u -rd76d3ce6c8c55fa23009dbb03b8bc06f482c5b72 -r7d59ab9183c933f2fc2682a95fb5d26cf2f952d7 --- src/libchcore/TSubTaskScanDirectory.h (.../TSubTaskScanDirectory.h) (revision d76d3ce6c8c55fa23009dbb03b8bc06f482c5b72) +++ src/libchcore/TSubTaskScanDirectory.h (.../TSubTaskScanDirectory.h) (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -44,8 +44,8 @@ virtual void Reset(); - virtual ESubOperationResult Exec(); - virtual ESubOperationType GetSubOperationType() const { return eSubOperation_Scanning; } + virtual ESubOperationResult Exec(const IFeedbackHandlerPtr& spFeedbackHandler) override; + virtual ESubOperationType GetSubOperationType() const override { return eSubOperation_Scanning; } virtual void Store(const ISerializerPtr& spSerializer) const; virtual void Load(const ISerializerPtr& spSerializer); Index: src/libchcore/TSubTaskStatsInfo.cpp =================================================================== diff -u -r79399818d01f20d3a83766543e98ef5f0ee3de38 -r7d59ab9183c933f2fc2682a95fb5d26cf2f952d7 --- src/libchcore/TSubTaskStatsInfo.cpp (.../TSubTaskStatsInfo.cpp) (revision 79399818d01f20d3a83766543e98ef5f0ee3de38) +++ src/libchcore/TSubTaskStatsInfo.cpp (.../TSubTaskStatsInfo.cpp) (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -32,21 +32,6 @@ BEGIN_CHCORE_NAMESPACE /////////////////////////////////////////////////////////////////////////////////// -// class TSubTaskProcessingGuard -TSubTaskProcessingGuard::TSubTaskProcessingGuard(TSubTaskStatsInfo& rStats) : - m_rStats(rStats) -{ - rStats.MarkAsRunning(); - rStats.EnableTimeTracking(); -} - -TSubTaskProcessingGuard::~TSubTaskProcessingGuard() -{ - m_rStats.DisableTimeTracking(); - m_rStats.MarkAsNotRunning(); -} - -/////////////////////////////////////////////////////////////////////////////////// // class TSubTaskStatsInfo TSubTaskStatsInfo::TSubTaskStatsInfo() : @@ -279,9 +264,12 @@ void TSubTaskStatsInfo::UpdateTime(boost::upgrade_lock& lock) const { boost::upgrade_to_unique_lock lock_upgraded(lock); - m_tTimer.Modify().Tick(); - m_tSizeSpeed.Modify().AddSample(0, m_tTimer.Get().GetLastTimestamp()); - m_tCountSpeed.Modify().AddSample(0, m_tTimer.Get().GetLastTimestamp()); + if (m_tTimer.Get().IsRunning()) + { + m_tTimer.Modify().Tick(); + m_tSizeSpeed.Modify().AddSample(0, m_tTimer.Get().GetLastTimestamp()); + m_tCountSpeed.Modify().AddSample(0, m_tTimer.Get().GetLastTimestamp()); + } } void TSubTaskStatsInfo::Store(ISerializerRowData& rRowData) const Index: src/libchcore/TSubTaskStatsInfo.h =================================================================== diff -u -r79399818d01f20d3a83766543e98ef5f0ee3de38 -r7d59ab9183c933f2fc2682a95fb5d26cf2f952d7 --- src/libchcore/TSubTaskStatsInfo.h (.../TSubTaskStatsInfo.h) (revision 79399818d01f20d3a83766543e98ef5f0ee3de38) +++ src/libchcore/TSubTaskStatsInfo.h (.../TSubTaskStatsInfo.h) (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -34,30 +34,16 @@ #include "TSharedModificationTracker.h" #include #include "CommonDataTypes.h" +#include "IRunningTimeControl.h" BEGIN_CHCORE_NAMESPACE class TSubTaskStatsInfo; class TSubTaskStatsSnapshot; -// class used to guard scope of the subtask processing ( -class TSubTaskProcessingGuard +class TSubTaskStatsInfo : public IRunningTimeControl { -public: - TSubTaskProcessingGuard(TSubTaskStatsInfo& rStats); - ~TSubTaskProcessingGuard(); - private: - TSubTaskProcessingGuard(const TSubTaskProcessingGuard&); - TSubTaskProcessingGuard& operator=(const TSubTaskProcessingGuard&); - -private: - TSubTaskStatsInfo& m_rStats; -}; - -class TSubTaskStatsInfo -{ -private: static const unsigned long long DefaultSpeedTrackTime = 1000; // in miliseconds static const unsigned long long DefaultSpeedSampleTime = 100; // in miliseconds @@ -120,16 +106,17 @@ void Load(const ISerializerRowReaderPtr& spRowReader); private: - TSubTaskStatsInfo(const TSubTaskStatsInfo&); - TSubTaskStatsInfo& operator=(const TSubTaskStatsInfo&); + TSubTaskStatsInfo(const TSubTaskStatsInfo&) = delete; + TSubTaskStatsInfo& operator=(const TSubTaskStatsInfo&) = delete; // is running? - void MarkAsRunning(); - void MarkAsNotRunning(); + virtual void MarkAsRunning() override; + virtual void MarkAsNotRunning() override; // time tracking - void EnableTimeTracking(); - void DisableTimeTracking(); + virtual void EnableTimeTracking() override; + virtual void DisableTimeTracking() override; + void UpdateTime(boost::upgrade_lock& lock) const; private: Index: src/libchcore/TTask.cpp =================================================================== diff -u -ree9b975618a07beb840aca724732da87b522d54b -r7d59ab9183c933f2fc2682a95fb5d26cf2f952d7 --- src/libchcore/TTask.cpp (.../TTask.cpp) (revision ee9b975618a07beb840aca724732da87b522d54b) +++ src/libchcore/TTask.cpp (.../TTask.cpp) (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -35,6 +35,10 @@ #include "ISerializerRowData.h" #include "TStringSet.h" #include "SerializerTrace.h" +#include "TScopedRunningTimeTracker.h" +#include "TScopedRunningTimeTrackerPause.h" +#include "TFeedbackHandlerWrapper.h" +#include BEGIN_CHCORE_NAMESPACE @@ -43,12 +47,12 @@ TTask::TTask(const ISerializerPtr& spSerializer, const IFeedbackHandlerPtr& spFeedbackHandler) : m_log(), - m_spFeedbackHandler(spFeedbackHandler), + m_spInternalFeedbackHandler(spFeedbackHandler), m_spSrcPaths(new TBasePathDataContainer), m_bForce(false), m_bContinue(false), m_tSubTaskContext(m_tConfiguration, m_spSrcPaths, m_afFilters, - m_cfgTracker, m_log, spFeedbackHandler, m_workerThread, m_fsLocal), + m_cfgTracker, m_log, m_workerThread, m_fsLocal), m_tSubTasksArray(m_tSubTaskContext), m_spSerializer(spSerializer) { @@ -464,7 +468,8 @@ DWORD TTask::ThrdProc() { // start tracking time for this thread - TTaskProcessingGuard tProcessingGuard(m_tLocalStats); + TScopedRunningTimeTracker tProcessingGuard(m_tLocalStats); + TFeedbackHandlerWrapperPtr spFeedbackHandler(boost::make_shared(m_spInternalFeedbackHandler, tProcessingGuard)); try { @@ -489,29 +494,26 @@ // prepare context for subtasks if(bReadTasksSize) - eResult = m_tSubTasksArray.Execute(true); + eResult = m_tSubTasksArray.Execute(spFeedbackHandler, true); if(eResult == TSubTaskBase::eSubResult_Continue) { - tProcessingGuard.PauseTimeTracking(); + TScopedRunningTimeTrackerPause scopedPause(tProcessingGuard); + eResult = CheckForWaitState(); // operation limiting - tProcessingGuard.UnPauseTimeTracking(); } if(eResult == TSubTaskBase::eSubResult_Continue) - eResult = m_tSubTasksArray.Execute(false); + eResult = m_tSubTasksArray.Execute(spFeedbackHandler, false); // change status to finished if(eResult == TSubTaskBase::eSubResult_Continue) SetTaskState(eTaskState_Finished); - // stop tracking time because of a possible blocking feedback dialogs - tProcessingGuard.PauseTimeTracking(); - // finishing processing // change task status switch(eResult) { case TSubTaskBase::eSubResult_Error: - m_spFeedbackHandler->RequestFeedback(IFeedbackHandler::eFT_OperationError, NULL); + spFeedbackHandler->RequestFeedback(IFeedbackHandler::eFT_OperationError, NULL); SetTaskState(eTaskState_Error); break; @@ -530,7 +532,7 @@ break; case TSubTaskBase::eSubResult_Continue: - m_spFeedbackHandler->RequestFeedback(IFeedbackHandler::eFT_OperationFinished, NULL); + spFeedbackHandler->RequestFeedback(IFeedbackHandler::eFT_OperationFinished, NULL); SetTaskState(eTaskState_Finished); break; @@ -568,11 +570,8 @@ // log m_log.loge(_T("Caught exception in ThrdProc")); - // stop tracking time because of a possible blocking feedback dialogs - tProcessingGuard.PauseTimeTracking(); - // let others know some error happened - m_spFeedbackHandler->RequestFeedback(IFeedbackHandler::eFT_OperationError, NULL); + spFeedbackHandler->RequestFeedback(IFeedbackHandler::eFT_OperationError, NULL); SetTaskState(eTaskState_Error); SetContinueFlag(false); Index: src/libchcore/TTask.h =================================================================== diff -u -r121d674474766192b5bf02afda67fb962635f56b -r7d59ab9183c933f2fc2682a95fb5d26cf2f952d7 --- src/libchcore/TTask.h (.../TTask.h) (revision 121d674474766192b5bf02afda67fb962635f56b) +++ src/libchcore/TTask.h (.../TTask.h) (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -130,7 +130,7 @@ #pragma warning(push) #pragma warning(disable: 4251) ISerializerPtr m_spSerializer; - IFeedbackHandlerPtr m_spFeedbackHandler; + IFeedbackHandlerPtr m_spInternalFeedbackHandler; #pragma warning(pop) // base data Index: src/libchcore/TTaskLocalStats.cpp =================================================================== diff -u -ra44714d5c7ec0f50a376f4d0ea919ee5a224f834 -r7d59ab9183c933f2fc2682a95fb5d26cf2f952d7 --- src/libchcore/TTaskLocalStats.cpp (.../TTaskLocalStats.cpp) (revision a44714d5c7ec0f50a376f4d0ea919ee5a224f834) +++ src/libchcore/TTaskLocalStats.cpp (.../TTaskLocalStats.cpp) (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -32,58 +32,6 @@ BEGIN_CHCORE_NAMESPACE //////////////////////////////////////////////////////////////////////////////// -// class TTaskProcessingGuard - -TTaskProcessingGuard::TTaskProcessingGuard(TTaskLocalStatsInfo& rLocalStats) : - m_rLocalStats(rLocalStats) -{ - rLocalStats.EnableTimeTracking(); - rLocalStats.MarkTaskAsRunning(); -} - -TTaskProcessingGuard::~TTaskProcessingGuard() -{ - m_rLocalStats.MarkTaskAsNotRunning(); - m_rLocalStats.DisableTimeTracking(); -} - -void TTaskProcessingGuard::PauseTimeTracking() -{ - if(!m_bTimeTrackingPaused) - { - m_rLocalStats.DisableTimeTracking(); - m_bTimeTrackingPaused = true; - } -} - -void TTaskProcessingGuard::UnPauseTimeTracking() -{ - if(m_bTimeTrackingPaused) - { - m_rLocalStats.EnableTimeTracking(); - m_bTimeTrackingPaused = false; - } -} - -void TTaskProcessingGuard::PauseRunningState() -{ - if(!m_bRunningStatePaused) - { - m_rLocalStats.MarkTaskAsNotRunning(); - m_bRunningStatePaused = true; - } -} - -void TTaskProcessingGuard::UnPauseRunningState() -{ - if(m_bRunningStatePaused) - { - m_rLocalStats.MarkTaskAsRunning(); - m_bRunningStatePaused = false; - } -} - -//////////////////////////////////////////////////////////////////////////////// // TTasksGlobalStats members TTaskLocalStatsInfo::TTaskLocalStatsInfo() : m_tTimer(m_setModifications), @@ -110,13 +58,13 @@ spSnapshot->SetTimeElapsed(m_tTimer.Get().GetTotalTime()); } -void TTaskLocalStatsInfo::MarkTaskAsRunning() +void TTaskLocalStatsInfo::MarkAsRunning() { boost::unique_lock lock(m_lock); m_bTaskIsRunning = true; } -void TTaskLocalStatsInfo::MarkTaskAsNotRunning() +void TTaskLocalStatsInfo::MarkAsNotRunning() { boost::unique_lock lock(m_lock); m_bTaskIsRunning = false; Index: src/libchcore/TTaskLocalStats.h =================================================================== diff -u -rfc67a825635691930b3ac00dc95b16e59f3d2fae -r7d59ab9183c933f2fc2682a95fb5d26cf2f952d7 --- src/libchcore/TTaskLocalStats.h (.../TTaskLocalStats.h) (revision fc67a825635691930b3ac00dc95b16e59f3d2fae) +++ src/libchcore/TTaskLocalStats.h (.../TTaskLocalStats.h) (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -28,37 +28,16 @@ #include "TSubTaskStatsInfo.h" #include "TTaskStatsSnapshot.h" #include "TSharedModificationTracker.h" +#include "IRunningTimeControl.h" BEGIN_CHCORE_NAMESPACE class TTaskLocalStatsInfo; class TTaskStatsSnapshot; -class TTaskProcessingGuard +class TTaskLocalStatsInfo : public IRunningTimeControl { public: - TTaskProcessingGuard(TTaskLocalStatsInfo& rLocalStats); - ~TTaskProcessingGuard(); - - void PauseTimeTracking(); - void UnPauseTimeTracking(); - - void PauseRunningState(); - void UnPauseRunningState(); - -private: - TTaskProcessingGuard(const TTaskProcessingGuard& rLocalStats); - TTaskProcessingGuard& operator=(const TTaskProcessingGuard& rLocalStats); - -private: - TTaskLocalStatsInfo& m_rLocalStats; - bool m_bTimeTrackingPaused; - bool m_bRunningStatePaused; -}; - -class TTaskLocalStatsInfo -{ -public: TTaskLocalStatsInfo(); ~TTaskLocalStatsInfo(); @@ -76,12 +55,12 @@ protected: // running/not running state - void MarkTaskAsRunning(); - void MarkTaskAsNotRunning(); + virtual void MarkAsRunning() override; + virtual void MarkAsNotRunning() override; // time tracking - void EnableTimeTracking(); - void DisableTimeTracking(); + virtual void EnableTimeTracking() override; + virtual void DisableTimeTracking() override; #pragma warning(push) #pragma warning(disable: 4251) @@ -116,7 +95,7 @@ mutable boost::shared_mutex m_lock; #pragma warning(pop) - friend class TTaskProcessingGuard; + friend class TScopedRunningTimeTracker; }; END_CHCORE_NAMESPACE Index: src/libchcore/libchcore.vc120.vcxproj =================================================================== diff -u -r122f5f17f602b989c626ab31bb7f32c4211f93bd -r7d59ab9183c933f2fc2682a95fb5d26cf2f952d7 --- src/libchcore/libchcore.vc120.vcxproj (.../libchcore.vc120.vcxproj) (revision 122f5f17f602b989c626ab31bb7f32c4211f93bd) +++ src/libchcore/libchcore.vc120.vcxproj (.../libchcore.vc120.vcxproj) (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -511,6 +511,7 @@ + @@ -523,13 +524,16 @@ + + + @@ -614,6 +618,7 @@ + @@ -678,12 +683,15 @@ true true + + + Index: src/libchcore/libchcore.vc120.vcxproj.filters =================================================================== diff -u -refef4b7b215e689180d0c02a3f7a89f8089bdc8e -r7d59ab9183c933f2fc2682a95fb5d26cf2f952d7 --- src/libchcore/libchcore.vc120.vcxproj.filters (.../libchcore.vc120.vcxproj.filters) (revision efef4b7b215e689180d0c02a3f7a89f8089bdc8e) +++ src/libchcore/libchcore.vc120.vcxproj.filters (.../libchcore.vc120.vcxproj.filters) (revision 7d59ab9183c933f2fc2682a95fb5d26cf2f952d7) @@ -51,6 +51,9 @@ {b7eef53f-fb70-4f50-aa6d-0a699bb20f25} + + {28670d3c-b5d8-4acb-91aa-c886efae641c} + @@ -317,6 +320,18 @@ Source Files\Tools + + Source Files\Feedback + + + Source Files\Stats + + + Source Files\Stats + + + Source Files\Stats + @@ -589,5 +604,17 @@ Source Files\Tools + + Source Files\Feedback + + + Source Files\Stats + + + Source Files\Stats + + + Source Files\Stats + \ No newline at end of file