|
Libosmium
2.22.0
Fast and flexible C++ library for working with OpenStreetMap data
|
#include <file.hpp>
Public Member Functions | |
| File (std::string filename="", std::string format="") | |
| File (const char *buffer, size_t size, const std::string &format="") | |
| const char * | buffer () const noexcept |
| size_t | buffer_size () const noexcept |
| void | parse_format (const std::string &format) |
| void | detect_format_from_suffix (const std::string &name) |
| const File & | check () const |
| file_format | format () const noexcept |
| File & | set_format (file_format format) noexcept |
| file_compression | compression () const noexcept |
| File & | set_compression (file_compression compression) noexcept |
| bool | has_multiple_object_versions () const noexcept |
| File & | set_has_multiple_object_versions (bool value) noexcept |
| File & | filename (const std::string &filename) |
| const std::string & | filename () const noexcept |
Private Attributes | |
| std::string | m_filename |
| const char * | m_buffer = nullptr |
| size_t | m_buffer_size = 0 |
| std::string | m_format_string |
| file_format | m_file_format = file_format::unknown |
| file_compression | m_file_compression = file_compression::none |
| bool | m_has_multiple_object_versions = false |
This class describes an OSM file in one of several different formats.
If the filename is empty or "-", this means stdin or stdout is used.
|
inlineexplicit |
Create File using type and encoding from filename or given format specification.
| filename | Filename including suffix. The type and encoding of the file will be taken from the suffix. An empty filename or "-" means stdin or stdout. |
| format | File format as string. See the description of the parse_format() function for details. If this is empty the format will be deduced from the suffix of the filename. |
|
inlineexplicit |
Create File using buffer pointer and size and type and encoding from given format specification.
| buffer | Pointer to buffer with data. |
| size | Size of buffer. |
| format | File format as string. See the description of the parse_format() function for details. |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
Check file format etc. for consistency and throw exception if there is a problem.
| osmium::io_error |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |