|
Osmium
0.1
|
#include <progress.hpp>


Public Member Functions | |
| Progress (int s=1000) | |
| void | hide_cursor () const |
| void | show_cursor () const |
| void | init (Osmium::OSM::Meta &) const |
| void | node (const shared_ptr< Osmium::OSM::Node const > &) |
| void | way (const shared_ptr< Osmium::OSM::Way const > &) |
| void | relation (const shared_ptr< Osmium::OSM::Relation const > &) |
| void | final () const |
Private Member Functions | |
| void | update_display (bool show_per_second=true) const |
Private Attributes | |
| uint64_t | count_nodes |
| uint64_t | count_ways |
| uint64_t | count_relations |
| int | step |
| bool | is_a_tty |
| timeval | first_node |
| timeval | first_way |
| timeval | first_relation |
Simple handler that shows progress on terminal by counting the number of nodes, ways, and relations already read and printing those counts to stdout.
If stdout is not a terminal, nothing is printed.
Note that this handler will hide the cursor. If the program is terminated before the final handler is called, it will not be re-activated. Call show_cursor() from an interrupt handler or similar, to do this properly.
| Osmium::Handler::Progress::Progress | ( | int | s = 1000 | ) | [inline] |
Initialize handler.
| s | Step, after how many nodes/ways/relations the display should be updated. (default 1000). |
| void Osmium::Handler::Progress::final | ( | ) | const [inline] |
Reimplemented from Osmium::Handler::Base.
| void Osmium::Handler::Progress::hide_cursor | ( | ) | const [inline] |
| void Osmium::Handler::Progress::init | ( | Osmium::OSM::Meta & | ) | const [inline] |
Reimplemented from Osmium::Handler::Base.
| void Osmium::Handler::Progress::node | ( | const shared_ptr< Osmium::OSM::Node const > & | ) | [inline] |
| void Osmium::Handler::Progress::relation | ( | const shared_ptr< Osmium::OSM::Relation const > & | ) | [inline] |
| void Osmium::Handler::Progress::show_cursor | ( | ) | const [inline] |
| void Osmium::Handler::Progress::update_display | ( | bool | show_per_second = true | ) | const [inline, private] |
| void Osmium::Handler::Progress::way | ( | const shared_ptr< Osmium::OSM::Way const > & | ) | [inline] |
uint64_t Osmium::Handler::Progress::count_nodes [private] |
uint64_t Osmium::Handler::Progress::count_relations [private] |
uint64_t Osmium::Handler::Progress::count_ways [private] |
timeval Osmium::Handler::Progress::first_node [private] |
timeval Osmium::Handler::Progress::first_relation [private] |
timeval Osmium::Handler::Progress::first_way [private] |
bool Osmium::Handler::Progress::is_a_tty [private] |
int Osmium::Handler::Progress::step [private] |
1.7.6.1