Index: src/libchcore/TSubTaskStatsInfo.h =================================================================== diff -u -N -ra5f396da5ed5ffb3fcd9fdf22afb5a7fd07e1ab8 -r19925be73ffcadd9f345f10e03e55aadb3f0eeac --- src/libchcore/TSubTaskStatsInfo.h (.../TSubTaskStatsInfo.h) (revision a5f396da5ed5ffb3fcd9fdf22afb5a7fd07e1ab8) +++ src/libchcore/TSubTaskStatsInfo.h (.../TSubTaskStatsInfo.h) (revision 19925be73ffcadd9f345f10e03e55aadb3f0eeac) @@ -29,6 +29,10 @@ #include "TSpeedTracker.h" #include "ESubTaskTypes.h" #include "TSubTaskStatsSnapshot.h" +#include "ISerializerRowData.h" +#include "ISerializerRowReader.h" +#include "TSharedModificationTracker.h" +#include BEGIN_CHCORE_NAMESPACE @@ -89,6 +93,11 @@ ESubOperationType GetSubOperationType() const { return m_eSubOperationType; } void SetSubOperationType(ESubOperationType val) { m_eSubOperationType = val; } + // serialization + void Store(const ISerializerRowDataPtr& spRowData) const; + static void InitLoader(const IColumnsDefinitionPtr& spColumnDefs); + void Load(const ISerializerRowReaderPtr& spRowReader); + private: TSubTaskStatsInfo(const TSubTaskStatsInfo&); TSubTaskStatsInfo& operator=(const TSubTaskStatsInfo&); @@ -103,26 +112,51 @@ void UpdateTime(boost::upgrade_lock& lock) const; private: - bool m_bSubTaskIsRunning; + enum EModifications + { + eMod_Added = 0, + eMod_IsRunning, + eMod_TotalSize, + eMod_ProcessedSize, + eMod_SizeSpeed, + eMod_TotalCount, + eMod_ProcessedCount, + eMod_CountSpeed, + eMod_CurrentItemProcessedSize, + eMod_CurrentItemTotalSize, + eMod_Timer, + eMod_CurrentBufferIndex, + eMod_CurrentPath, + eMod_SubOperationType, - unsigned long long m_ullTotalSize; - unsigned long long m_ullProcessedSize; - mutable TSpeedTracker m_tSizeSpeed; + // last item + eMod_Last + }; - size_t m_stTotalCount; - size_t m_stProcessedCount; - mutable TSpeedTracker m_tCountSpeed; + typedef std::bitset Bitset; + mutable Bitset m_setModifications; - unsigned long long m_ullCurrentItemProcessedSize; - unsigned long long m_ullCurrentItemTotalSize; + TSharedModificationTracker m_bSubTaskIsRunning; - mutable TSimpleTimer m_tTimer; + TSharedModificationTracker m_ullTotalSize; + TSharedModificationTracker m_ullProcessedSize; + mutable TSharedModificationTracker m_tSizeSpeed; - int m_iCurrentBufferIndex; + TSharedModificationTracker m_stTotalCount; + TSharedModificationTracker m_stProcessedCount; + mutable TSharedModificationTracker m_tCountSpeed; - TString m_strCurrentPath; // currently processed path + TSharedModificationTracker m_ullCurrentItemProcessedSize; + TSharedModificationTracker m_ullCurrentItemTotalSize; - ESubOperationType m_eSubOperationType; + mutable TSharedModificationTracker m_tTimer; + + TSharedModificationTracker m_iCurrentBufferIndex; + + TSharedModificationTracker m_strCurrentPath; // currently processed path + + TSharedModificationTracker m_eSubOperationType; + #pragma warning(push) #pragma warning(disable: 4251) mutable boost::shared_mutex m_lock;