28#include <ql/shared_ptr.hpp>
29#include <boost/unordered_set.hpp>
45 virtual void updateProgress(
const unsigned long progress,
const unsigned long total,
const std::string& detail) = 0;
66 void updateProgress(
const unsigned long progress,
const unsigned long total,
const std::string& detail =
"");
75 std::set<QuantLib::ext::shared_ptr<ProgressIndicator>>
indicators_;
87 SimpleProgressBar(
const std::string& message,
const QuantLib::Size messageWidth = 40,
88 const QuantLib::Size barWidth = 40,
const QuantLib::Size numberOfScreenUpdates = 100);
91 void updateProgress(
const unsigned long progress,
const unsigned long total,
const std::string& detail)
override;
92 void reset()
override;
105 ProgressLog(
const std::string& message,
const unsigned int numberOfMessages = 100,
109 void updateProgress(
const unsigned long progress,
const unsigned long total,
const std::string& detail)
override;
110 void reset()
override;
122 NoProgressBar(
const std::string& message,
const unsigned int messageWidth = 40);
125 void updateProgress(
const unsigned long progress,
const unsigned long total,
const std::string& detail)
override {}
133 void updateProgress(
const unsigned long progress,
const unsigned long total,
const std::string& detail)
override;
134 void reset()
override;
138 std::set<QuantLib::ext::shared_ptr<ProgressIndicator>>
indicators_;
139 std::map<std::thread::id, std::tuple<unsigned long, unsigned long, std::string>>
threadData_;
void updateProgress(const unsigned long progress, const unsigned long total, const std::string &detail) override
std::set< QuantLib::ext::shared_ptr< ProgressIndicator > > indicators_
std::map< std::thread::id, std::tuple< unsigned long, unsigned long, std::string > > threadData_
boost::shared_mutex mutex_
void updateProgress(const unsigned long progress, const unsigned long total, const std::string &detail) override
Abstract Base class for a Progress Indicator.
virtual ~ProgressIndicator()
virtual void updateProgress(const unsigned long progress, const unsigned long total, const std::string &detail)=0
Progress Logger that writes the progress using the LOG macro.
unsigned int numberOfMessages_
void updateProgress(const unsigned long progress, const unsigned long total, const std::string &detail) override
ProgressIndicator interface.
unsigned int messageCounter_
Base class for a Progress Reporter.
const std::set< QuantLib::ext::shared_ptr< ProgressIndicator > > & progressIndicators() const
return progress indicators
void resetProgress()
reset
void unregisterProgressIndicator(const QuantLib::ext::shared_ptr< ProgressIndicator > &indicator)
unregister a Progress Indicator
void updateProgress(const unsigned long progress, const unsigned long total, const std::string &detail="")
update progress
std::set< QuantLib::ext::shared_ptr< ProgressIndicator > > indicators_
void registerProgressIndicator(const QuantLib::ext::shared_ptr< ProgressIndicator > &indicator)
register a Progress Indicator
void unregisterAllProgressIndicators()
unregister all progress indicators
void updateProgress(const unsigned long progress, const unsigned long total, const std::string &detail) override
ProgressIndicator interface.
unsigned int messageWidth_
unsigned int updateCounter_
unsigned int numberOfScreenUpdates_
Classes and functions for log message handling.
Serializable Credit Default Swap.