Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #include "CompByID.h"
00009 #include "../util.h"
00010
00011 namespace osm
00012 {
00013
00014 bool EqByID::operator ()(const Element& a, const Element& b) const
00015 {
00016 return a.get_type() == b.get_type() && a.get_id() == b.get_id();
00017 }
00018
00019 bool LtByID::operator ()(const Element& a, const Element& b) const
00020 {
00021 if (a.get_type() < b.get_type())
00022 return true;
00023 if (a.get_type() > b.get_type())
00024 return false;
00025 return a.get_id() < b.get_id();
00026 }
00027
00028 bool GtByID::operator ()(const Element& a, const Element& b) const
00029 {
00030 return util::greater_than_impl<LtByID, EqByID>(a, b);
00031 }
00032
00033 bool GeByID::operator ()(const Element& a, const Element& b) const
00034 {
00035 return util::greater_eq_impl<LtByID>(a, b);
00036 }
00037
00038 bool LeByID::operator ()(const Element& a, const Element& b) const
00039 {
00040 return util::less_eq_impl<LtByID, EqByID>(a, b);
00041 }
00042
00043 bool NeByID::operator ()(const Element& a, const Element& b) const
00044 {
00045 return util::not_eq_impl<EqByID>(a, b);
00046 }
00047
00048 }
00049
00050