Wayverb
progress_bar.h
1 #pragma once
2 
3 #include <iostream>
4 
5 namespace util {
6 
7 class progress_bar final {
8 public:
9  progress_bar(std::ostream& os = std::cerr);
10 
11  // We print a newline on destruction so that separate progress bars get
12  // separated out.
13  ~progress_bar() noexcept;
14 
15  void set_progress(float progress);
16 
17 private:
18  std::ostream& os_;
19 };
20 
21 void set_progress(progress_bar& pb, float progress);
22 void set_progress(progress_bar& pb, int step, int steps);
23 
24 } // namespace util
Definition: allocator.h:6
Definition: progress_bar.h:7