Example #1
0
 /**
  * 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());
         }
     }
 }
Example #2
0
 void update(const NodeRef& node_ref) {
     update_int64(node_ref.ref());
 }
Example #3
0
 /**
  * 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();
 }
Example #4
0
 inline bool operator==(const NodeRef& lhs, const NodeRef& rhs) noexcept {
     return lhs.ref() == rhs.ref();
 }