|
Libosmium
2.22.0
Fast and flexible C++ library for working with OpenStreetMap data
|
Helpful utility classes and functions not strictly OSM related. More...
Classes | |
| class | AnonymousMemoryMapping |
| class | AnonymousTypedMemoryMapping |
| class | DeltaDecode |
| class | DeltaEncode |
| class | MemoryMapping |
| class | Options |
| class | TypedMemoryMapping |
| class | VerboseOutput |
Functions | |
| uint16_t | byte_swap_16 (uint16_t value) noexcept |
| uint32_t | byte_swap_32 (uint32_t value) noexcept |
| uint64_t | byte_swap_64 (uint64_t value) noexcept |
| template<typename T > | |
| T | double2string (T iterator, double value, int precision) |
| void | double2string (std::string &out, double value, int precision) |
| std::size_t | file_size (int fd) |
| std::size_t | file_size (const char *name) |
| std::size_t | file_size (const std::string &name) |
| void | resize_file (int fd, std::size_t new_size) |
| std::size_t | get_pagesize () noexcept |
| std::size_t | file_offset (int fd) noexcept |
| void | file_seek (int fd, std::size_t offset) noexcept |
| bool | isatty (int fd) noexcept |
| template<typename T > | |
| VerboseOutput & | operator<< (VerboseOutput &verbose_output, const T &value) |
Helpful utility classes and functions not strictly OSM related.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
Write double to string, removing superfluous '0' characters at the end. The decimal dot will also be removed if necessary.
| out | string |
| value | the value that should be written |
| precision | max number of digits after the decimal point |
|
inline |
Write double to iterator, removing superfluous '0' characters at the end. The decimal dot will also be removed if necessary.
| T | iterator type |
| iterator | output iterator |
| value | the value that should be written |
| precision | max number of digits after the decimal point (must be <= 17) |
|
inlinenoexcept |
Get current offset into file.
| fd | Open file descriptor. |
|
inlinenoexcept |
Set current offset into file.
| fd | Open file descriptor. |
| offset | Desired absolute offset into the file |
|
inline |
Get file size. This is a small wrapper around a system call.
| name | File name |
| std::system_error | If system call failed |
|
inline |
Get file size. This is a small wrapper around a system call.
| name | File name |
| std::system_error | If system call failed |
|
inline |
Get file size. This is a small wrapper around a system call.
| fd | File descriptor |
| std::system_error | If system call failed |
|
inlinenoexcept |
Get the page size for this system.
|
inlinenoexcept |
Check whether the file descriptor refers to a TTY.
| fd | Open file descriptor. |
|
inline |
|
inline |
Resize file. Small wrapper around ftruncate(2) system call.
| fd | File descriptor |
| new_size | New size |
| std::system_error | If ftruncate(2) call failed |