Libosmium
2.6.1
Fast and flexible C++ library for working with OpenStreetMap data
|
#include <file.hpp>
Public Member Functions | |
File (const std::string &filename="", const std::string &format="") | |
File (const char *buffer, size_t size, const std::string &format="") | |
File (const File &)=default | |
File & | operator= (const File &)=default |
File (File &&)=default | |
File & | operator= (File &&)=default |
~File ()=default | |
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 |
![]() | |
Options ()=default | |
Options (const std::initializer_list< value_type > &values) | |
void | set (const std::string &key, const std::string &value) |
void | set (const std::string &key, const char *value) |
void | set (const std::string &key, bool value) |
void | set (std::string data) |
std::string | get (const std::string &key, const std::string &default_value="") const noexcept |
bool | is_true (const std::string &key) const noexcept |
bool | is_not_false (const std::string &key) const noexcept |
size_t | size () const noexcept |
iterator | begin () noexcept |
iterator | end () noexcept |
const_iterator | begin () const noexcept |
const_iterator | end () const noexcept |
const_iterator | cbegin () const noexcept |
const_iterator | cend () const noexcept |
Private Attributes | |
std::string | m_filename |
const char * | m_buffer |
size_t | m_buffer_size |
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} |
Additional Inherited Members | |
![]() | |
using | iterator = option_map::iterator |
using | const_iterator = option_map::const_iterator |
using | value_type = option_map::value_type |
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. |
|
default |
|
default |
|
default |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
Check file format etc. for consistency and throw exception if there is a problem.
osmium::io_error |
|
inlinenoexcept |
|
inline |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |