Libosmium
2.16.0
Fast and flexible C++ library for working with OpenStreetMap data
|
Go to the documentation of this file. 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
bool m_do_cleanup
Definition: progress_bar.hpp:85
void done()
Definition: progress_bar.hpp:179
void display()
Definition: progress_bar.hpp:87
std::size_t m_done_size
Definition: progress_bar.hpp:70
ProgressBar & operator=(const ProgressBar &)=delete
std::size_t m_max_size
Definition: progress_bar.hpp:67
void update(std::size_t current_size)
Definition: progress_bar.hpp:150
Definition: progress_bar.hpp:46
static const char * spc(std::size_t len=full_length) noexcept
Definition: progress_bar.hpp:58
Namespace for everything in the Osmium library.
Definition: assembler.hpp:53
void remove()
Definition: progress_bar.hpp:194
static const char * bar(std::size_t len=full_length) noexcept
Definition: progress_bar.hpp:52
std::size_t file_size(int fd)
Definition: file.hpp:109
std::size_t m_prev_percent
Definition: progress_bar.hpp:78
@ full_length
Definition: progress_bar.hpp:49
ProgressBar(std::size_t max_size, bool enable) noexcept
Definition: progress_bar.hpp:120
bool m_enable
Definition: progress_bar.hpp:81
std::size_t m_current_size
Definition: progress_bar.hpp:73
void file_done(std::size_t file_size)
Definition: progress_bar.hpp:166