1 #ifndef OSMIUM_UTIL_PROGRESS_BAR_HPP 2 #define OSMIUM_UTIL_PROGRESS_BAR_HPP 53 static const char* s =
"======================================================================";
59 static const char* s =
" ";
94 const auto num = static_cast<std::size_t>(percent * (
full_length / 100.0));
108 std::cerr << percent <<
"% \r";
196 std::cerr <<
spc() <<
" \r";
205 #endif // OSMIUM_UTIL_PROGRESS_BAR_HPP ProgressBar(std::size_t max_size, bool enable) noexcept
Definition: progress_bar.hpp:120
std::size_t file_size(int fd)
Definition: file.hpp:109
static const char * spc(std::size_t len=full_length) noexcept
Definition: progress_bar.hpp:58
void update(std::size_t current_size)
Definition: progress_bar.hpp:150
static const char * bar(std::size_t len=full_length) noexcept
Definition: progress_bar.hpp:52
void done()
Definition: progress_bar.hpp:179
std::size_t m_max_size
Definition: progress_bar.hpp:67
std::size_t m_done_size
Definition: progress_bar.hpp:70
Namespace for everything in the Osmium library.
Definition: assembler.hpp:53
bool m_enable
Definition: progress_bar.hpp:81
Definition: progress_bar.hpp:46
void file_done(std::size_t file_size)
Definition: progress_bar.hpp:166
void remove()
Definition: progress_bar.hpp:194
Definition: progress_bar.hpp:49
bool m_do_cleanup
Definition: progress_bar.hpp:85
ProgressBar & operator=(const ProgressBar &)=delete
std::size_t m_prev_percent
Definition: progress_bar.hpp:78
void display()
Definition: progress_bar.hpp:87
std::size_t m_current_size
Definition: progress_bar.hpp:73