Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Store and display breadcrumbs in progress_indicator_arrow

  • Loading branch information...
commit fe47191ca443de7d3000c22bb44614ee8700c41d 1 parent 0ccb0f6
@Mortal Mortal authored
Showing with 16 additions and 0 deletions.
  1. +16 −0 tpie/progress_indicator_arrow.h
View
16 tpie/progress_indicator_arrow.h
@@ -68,6 +68,14 @@ namespace tpie {
m_progress = 0;
}
+ void push_breadcrumb(const char * crumb, description_importance /*importance*/) {
+ m_crumbs.push_back(crumb);
+ }
+
+ void pop_breadcrumb() {
+ m_crumbs.pop_back();
+ }
+
///////////////////////////////////////////////////////////////////////////
/// Display the indicator.
///////////////////////////////////////////////////////////////////////////
@@ -103,6 +111,12 @@ namespace tpie {
// Print either a percentage sign or the maximum range.
display_percentage();
+
+ for (std::deque<std::string>::iterator i = m_crumbs.begin(); i != m_crumbs.end(); ++i) {
+ if (i == m_crumbs.begin()) m_os << ' ';
+ else m_os << " > ";
+ m_os << *i;
+ }
m_os << ' ' << estimated_remaining_time();
m_os << std::flush;
@@ -121,6 +135,8 @@ namespace tpie {
/** ostream on which to display the progress indicator */
std::ostream & m_os;
+ std::deque<std::string> m_crumbs;
+
private:
progress_indicator_arrow();
Please sign in to comment.
Something went wrong with that request. Please try again.