25 #ifndef __TPIE_FRACTIONAL_PROGRESS__
26 #define __TPIE_FRACTIONAL_PROGRESS__
28 #include <tpie/tpie_export.h>
38 #define TPIE_FSI __FILE__,__FUNCTION__
52 class fractional_progress;
64 const char *
function,
67 description_importance importance=IMPORTANCE_MAJOR,
70 void setup(
const char *
id,
72 const char *
function,
75 description_importance importance=IMPORTANCE_MAJOR,
83 virtual void init(stream_size_type range);
95 stream_size_type m_estimate;
121 void init(stream_size_type range=0);
128 void push_breadcrumb(
const char * crumb, description_importance importance) {
129 if (m_pi) m_pi->push_breadcrumb(crumb, importance);
132 void pop_breadcrumb() {
133 if (m_pi) m_pi->pop_breadcrumb();
150 stream_size_type m_time_sum;
152 void stat(std::string, time_type, stream_size_type);
153 std::vector< std::pair<std::string, std::pair<time_type, stream_size_type> > > m_stat;
155 std::string sub_indicators_ss();
160 TPIE_EXPORT
void update_fractions(
const char * name,
float frac, stream_size_type n);
161 TPIE_EXPORT
void load_fractions(
const std::string & path);
162 TPIE_EXPORT
void save_fractions(
const std::string & path,
bool force =
false);
165 #endif //__TPIE_FRACTIONAL_PROGRESS__