/** * Update all nodes in a way with the ID of the given NodeRef with the * location of the given NodeRef. */ void update_node_location(const NodeRef& new_node_ref) { for (auto& node_ref : nodes()) { if (node_ref.ref() == new_node_ref.ref()) { node_ref.location(new_node_ref.location()); } } }
void update(const NodeRef& node_ref) { update_int64(node_ref.ref()); }
/** * Compare two NodeRefs. NodeRefs are ordered according to the Node ID * they reference. */ inline constexpr bool operator<(const NodeRef& lhs, const NodeRef& rhs) noexcept { return lhs.ref() < rhs.ref(); }
inline bool operator==(const NodeRef& lhs, const NodeRef& rhs) noexcept { return lhs.ref() == rhs.ref(); }