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
>(
static_cast<double>(percent) * (
static_cast<double>(
full_length) / 100.0));
108 std::cerr << percent <<
"% \r";
196 std::cerr <<
spc() <<
" \r";
Definition: progress_bar.hpp:46
bool m_enable
Definition: progress_bar.hpp:81
ProgressBar & operator=(const ProgressBar &)=delete
std::size_t m_prev_percent
Definition: progress_bar.hpp:78
ProgressBar(std::size_t max_size, bool enable) noexcept
Definition: progress_bar.hpp:120
@ full_length
Definition: progress_bar.hpp:49
std::size_t m_done_size
Definition: progress_bar.hpp:70
void remove()
Definition: progress_bar.hpp:194
bool m_do_cleanup
Definition: progress_bar.hpp:85
static const char * bar(std::size_t len=full_length) noexcept
Definition: progress_bar.hpp:52
ProgressBar(const ProgressBar &)=delete
static const char * spc(std::size_t len=full_length) noexcept
Definition: progress_bar.hpp:58
void display()
Definition: progress_bar.hpp:87
ProgressBar(ProgressBar &&) noexcept=default
std::size_t m_max_size
Definition: progress_bar.hpp:67
void file_done(std::size_t file_size)
Definition: progress_bar.hpp:166
std::size_t m_current_size
Definition: progress_bar.hpp:73
void done()
Definition: progress_bar.hpp:179
void update(std::size_t current_size)
Definition: progress_bar.hpp:150
std::size_t file_size(int fd)
Definition: file.hpp:109
Namespace for everything in the Osmium library.
Definition: assembler.hpp:53