Index: src/libchcore/TSubTaskArray.h =================================================================== diff -u -N -rc6d96d4152aab0785a5f850b5ed9eb4a3584fd91 -r0b8ae6ab8b538881b651126bf8e6de9c9912a782 --- src/libchcore/TSubTaskArray.h (.../TSubTaskArray.h) (revision c6d96d4152aab0785a5f850b5ed9eb4a3584fd91) +++ src/libchcore/TSubTaskArray.h (.../TSubTaskArray.h) (revision 0b8ae6ab8b538881b651126bf8e6de9c9912a782) @@ -28,6 +28,7 @@ #include "TSubTaskBase.h" #include "TTaskLocalStats.h" #include "TSubTaskArrayStatsSnapshot.h" +#include BEGIN_CHCORE_NAMESPACE @@ -51,8 +52,8 @@ void ResetProgressAndStats(); // progress handling - void SerializeProgress(TReadBinarySerializer& rSerializer); - void SerializeProgress(TWriteBinarySerializer& rSerializer) const; + void Store(const ISerializerPtr& spSerializer) const; + void Load(const ISerializerPtr& spSerializer); TSubTaskBase::ESubOperationResult Execute(bool bRunOnlyEstimationSubTasks); @@ -61,18 +62,20 @@ TSubTasksArray& operator=(const TSubTasksArray& rSrc); void AddSubTask(const TSubTaskBasePtr& spOperation, bool bIsPartOfEstimation); + static TSubTaskBasePtr CreateSubtask(ESubOperationType eType, TSubTaskContext& rContext); private: TSubTaskContext* m_pSubTaskContext; EOperationType m_eOperationType; #pragma warning(push) #pragma warning(disable: 4251) - std::vector > m_vSubTasks; // pointer to the subtask object / part of the whole process / is this the part of estimation? + std::vector > m_vSubTasks; // pointer to the subtask object / is this the part of estimation? + + mutable boost::atomic m_lSubOperationIndex; // index of sub-operation from TOperationDescription + mutable long m_lLastStoredIndex; #pragma warning(pop) - volatile long m_lSubOperationIndex; // index of sub-operation from TOperationDescription - friend class TTaskProcessingGuard; };