25 #ifndef WPROGRESSCOMBINER_H
26 #define WPROGRESSCOMBINER_H
30 #include <shared_mutex>
33 #include <boost/thread.hpp>
35 #include "WProgress.h"
48 typedef std::shared_ptr< WProgressCombiner >
SPtr;
53 typedef std::shared_ptr< const WProgressCombiner >
ConstSPtr;
97 virtual void addSubProgress( std::shared_ptr< WProgress > progress );
Class testing the functionality of progress combiners.
Base class for all kinds of progress combinations.
virtual void removeSubProgress(std::shared_ptr< WProgress > progress)
Removes the specified sub progress from this combiner.
std::shared_ptr< WProgressCombiner > SPtr
Abbreviate shared_ptr for this class.
virtual void addSubProgress(std::shared_ptr< WProgress > progress)
Adds a new progress to this combiner.
virtual void update()
Function updating the internal state.
WProgressCombiner(std::string name="")
Default constructor.
std::shared_mutex m_updateLock
Lock for the above child set and the internal state update.
std::set< std::shared_ptr< WProgress > > m_children
Set of all child progress.
virtual ~WProgressCombiner()
Destructor.
virtual float getProgress()
Returns the overall progress of this progress instance, including the child progress'.
std::shared_ptr< const WProgressCombiner > ConstSPtr
Abbreviate shared_ptr for this class.
virtual void finish()
Stops the progress.
virtual WProgressCombiner & operator++()
Simple increment operator to signal a forward stepping.
std::string getCombinedNames(bool excludeFinished=false) const
Generates a string combined out of every child progress name.
std::string m_name
The name of the combiner.
float m_progress
The current conglomerated progress.
Class managing progress inside of modules.