|
Libosmium
2.2.0
Fast and flexible C++ library for working with OpenStreetMap data
|
#include <writer.hpp>

Public Member Functions | |
| Writer (const osmium::io::File &file, const osmium::io::Header &header=osmium::io::Header(), overwrite allow_overwrite=overwrite::no) | |
| Writer (const std::string &filename, const osmium::io::Header &header=osmium::io::Header(), overwrite allow_overwrite=overwrite::no) | |
| Writer (const char *filename, const osmium::io::Header &header=osmium::io::Header(), overwrite allow_overwrite=overwrite::no) | |
| Writer (const Writer &)=delete | |
| Writer & | operator= (const Writer &)=delete |
| ~Writer () | |
| void | operator() (osmium::memory::Buffer &&buffer) |
| void | close () |
Private Attributes | |
| osmium::io::File | m_file |
| osmium::io::detail::data_queue_type | m_output_queue |
| std::unique_ptr< osmium::io::detail::OutputFormat > | m_output |
| std::unique_ptr< osmium::io::Compressor > | m_compressor |
| std::future< bool > | m_write_future |
This is the user-facing interface for writing OSM files. Instantiate an object of this class with a file name or osmium::io::File object and optionally the data for the header and then call operator() on it to write Buffers. Call close() to finish up.
|
inlineexplicit |
The constructor of the Writer object opens a file and writes the header to it.
| file | File (contains name and format info) to open. |
| header | Optional header data. If this is not given sensible defaults will be used. See the default constructor of osmium::io::Header for details. |
| allow_overwrite | Allow overwriting of existing file? Can be osmium::io::overwrite::allow or osmium::io::overwrite::no (default). |
| std::runtime_error | If the file could not be opened. |
| std::system_error | If the file could not be opened. |
|
inlineexplicit |
|
inlineexplicit |
|
delete |
|
inline |
|
inline |
|
inline |
Write contents of a buffer to the output file.
| Some | form of std::runtime_error when there is a problem. |
|
private |
|
private |
|
private |
|
private |
|
private |
1.8.9.1