1 #ifndef OSMIUM_OSM_NODE_REF_HPP
2 #define OSMIUM_OSM_NODE_REF_HPP
50 class NodeRef :
public osmium::memory::detail::ItemHelper {
82 return m_location.
lon();
86 return m_location.
lat();
89 int32_t
x() const noexcept {
90 return m_location.
x();
93 int32_t
y() const noexcept {
94 return m_location.
y();
110 return lhs.ref() == rhs.ref();
114 return ! (lhs == rhs);
118 return lhs.ref() < rhs.ref();
126 return ! (rhs < lhs);
130 return ! (lhs < rhs);
136 template <
typename TChar,
typename TTraits>
137 inline std::basic_ostream<TChar, TTraits>& operator<<(std::basic_ostream<TChar, TTraits>& out,
const osmium::NodeRef& nr) {
138 return out <<
"<" << nr.
ref() <<
" " << nr.location() <<
">";
147 return lhs.location() == rhs.location();
162 return lhs.location() < rhs.location();
173 #endif // OSMIUM_OSM_NODE_REF_HPP
int32_t y() const noexcept
Definition: node_ref.hpp:93
NodeRef second_argument_type
Definition: node_ref.hpp:166
double lat() const
Definition: node_ref.hpp:85
NodeRef & set_ref(const osmium::object_id_type ref) noexcept
Definition: node_ref.hpp:97
Definition: node_ref.hpp:144
uint64_t unsigned_object_id_type
Type for OSM object (node, way, or relation) IDs where we only allow positive IDs.
Definition: types.hpp:47
bool operator<=(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:324
NodeRef second_argument_type
Definition: node_ref.hpp:151
Definition: node_ref.hpp:159
osmium::Location location() const noexcept
Definition: node_ref.hpp:77
osmium::object_id_type ref() const noexcept
Definition: node_ref.hpp:62
OSMIUM_CONSTEXPR bool operator==(const Box &lhs, const Box &rhs) noexcept
Definition: box.hpp:219
double lat() const
Definition: location.hpp:205
bool operator()(const NodeRef &lhs, const NodeRef &rhs) const noexcept
Definition: node_ref.hpp:146
bool operator()(const NodeRef &lhs, const NodeRef &rhs) const noexcept
Definition: node_ref.hpp:161
bool operator<(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:316
int64_t object_id_type
Type for OSM object (node, way, or relation) IDs.
Definition: types.hpp:46
Namespace for everything in the Osmium library.
Definition: assembler.hpp:55
NodeRef first_argument_type
Definition: node_ref.hpp:150
bool result_type
Definition: node_ref.hpp:167
NodeRef & set_location(const osmium::Location &location) noexcept
Definition: node_ref.hpp:102
constexpr int32_t y() const noexcept
Definition: location.hpp:167
osmium::object_id_type m_ref
Definition: node_ref.hpp:52
osmium::Location m_location
Definition: node_ref.hpp:53
Definition: location.hpp:79
osmium::Location & location() noexcept
Definition: node_ref.hpp:73
bool operator>=(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:328
NodeRef(const osmium::object_id_type ref=0, const osmium::Location &location=Location()) noexcept
Definition: node_ref.hpp:57
osmium::unsigned_object_id_type positive_ref() const noexcept
Definition: node_ref.hpp:66
double lon() const
Definition: location.hpp:186
bool operator>(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:320
NodeRef first_argument_type
Definition: node_ref.hpp:165
constexpr int32_t x() const noexcept
Definition: location.hpp:163
double lon() const
Definition: node_ref.hpp:81
Definition: node_ref.hpp:50
bool result_type
Definition: node_ref.hpp:152
bool operator!=(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:309
int32_t x() const noexcept
Definition: node_ref.hpp:89