Joedb 9.5.0
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Progress_Bar.h
Go to the documentation of this file.
1#ifndef joedb_io_Progress_Bar_declared
2#define joedb_io_Progress_Bar_declared
3
4#include <cstdint>
5#include <iosfwd>
6
7namespace joedb
8{
9 /// @ingroup ui
11 {
12 private:
13 static constexpr int length = 79;
14 static constexpr int64_t threshold = 16384;
15
16 const int64_t total;
17 std::ostream *out;
18
19 int current_display;
20
21 public:
22 Progress_Bar(int64_t total, std::ostream *out);
23 void print(int64_t current);
24 void print_remaining(int64_t remaining) {print(total - remaining);}
26 };
27}
28
29#endif
void print(int64_t current)
void print_remaining(int64_t remaining)
Definition Blob.h:7