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