1 #ifndef OSMIUM_HANDLER_CHECK_ORDER_HPP 2 #define OSMIUM_HANDLER_CHECK_ORDER_HPP 57 std::runtime_error(what),
62 std::runtime_error(what),
93 if (m_max_way_id > 0) {
96 if (m_max_relation_id > 0) {
100 if (m_max_node_id == node.
id()) {
101 throw out_of_order_error{
"Node ID twice in input. Maybe you are using a history or changes file?", node.
id()};
103 if (m_max_node_id > node.
id()) {
106 m_max_node_id = node.
id();
110 if (m_max_relation_id > 0) {
114 if (m_max_way_id == way.
id()) {
115 throw out_of_order_error{
"Way ID twice in input. Maybe you are using a history or changes file?", way.
id()};
117 if (m_max_way_id > way.
id()) {
120 m_max_way_id = way.
id();
124 if (m_max_relation_id == relation.
id()) {
125 throw out_of_order_error{
"Relation ID twice in input. Maybe you are using a history or changes file?", relation.
id()};
127 if (m_max_relation_id > relation.
id()) {
130 m_max_relation_id = relation.
id();
134 return m_max_node_id;
142 return m_max_relation_id;
151 #endif // OSMIUM_HANDLER_CHECK_ORDER_HPP
osmium::object_id_type object_id
Definition: check_order.hpp:54
Definition: check_order.hpp:84
Definition: relation.hpp:168
void node(const osmium::Node &node)
Definition: check_order.hpp:92
Definition: reader_iterator.hpp:39
Definition: handler.hpp:71
void way(const osmium::Way &way)
Definition: check_order.hpp:109
osmium::object_id_type max_node_id() const noexcept
Definition: check_order.hpp:133
Namespace for everything in the Osmium library.
Definition: assembler.hpp:63
osmium::object_id_type max_relation_id() const noexcept
Definition: check_order.hpp:141
int64_t object_id_type
Type for OSM object (node, way, or relation) IDs.
Definition: types.hpp:45
Definition: check_order.hpp:52
out_of_order_error(const char *what, osmium::object_id_type id)
Definition: check_order.hpp:61
object_id_type id() const noexcept
Get ID of this object.
Definition: object.hpp:126
void relation(const osmium::Relation &relation)
Definition: check_order.hpp:123
out_of_order_error(const std::string &what, osmium::object_id_type id)
Definition: check_order.hpp:56
osmium::object_id_type max_way_id() const noexcept
Definition: check_order.hpp:137