/home/martin/workspace/OpenStreetNav/src/elements/CompByID.h
Go to the documentation of this file.
00001 /*
00002  * EqByID.h
00003  *
00004  *  Created on: Jan 12, 2012
00005  *      Author: martin
00006  */
00007 
00008 #ifndef COMPBYID_H_
00009 #define COMPBYID_H_
00010 
00011 #include "Element.h"
00012 
00013 namespace osm
00014 {
00015 
00016 class EqByID
00017 {
00018 public:
00019     bool operator()(Element const& a, Element const& b) const;
00020 
00021 };
00022 
00023 class NeByID
00024 {
00025 public:
00026     bool operator()(Element const& a, Element const& b) const;
00027 
00028 };
00029 
00030 class LtByID
00031 {
00032 public:
00033     bool operator()(Element const& a, Element const& b) const;
00034 };
00035 
00036 class GtByID
00037 {
00038 public:
00039     bool operator()(Element const& a, Element const& b) const;
00040 };
00041 
00042 class GeByID
00043 {
00044 public:
00045     bool operator()(Element const& a, Element const& b) const;
00046 };
00047 
00048 class LeByID
00049 {
00050 public:
00051     bool operator()(Element const& a, Element const& b) const;
00052 };
00053 
00054 template<typename A, typename B>
00055 class DerefEqByID
00056 {
00057 public:
00058     bool operator()(A const& a, B const& b) const
00059     {
00060         return EqByID()(*a, *b);
00061     }
00062 };
00063 
00064 template<typename A, typename B>
00065 DerefEqByID<A, B> deref_eq_by_id(A const& a, B const& b)
00066 {
00067     return DerefEqByID<A, B>();
00068 }
00069 
00070 } /* namespace osm */
00071 #endif /* COMPBYID_H_ */
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines