All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
RoadClassification.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Roads.h"
6 #include "FunctionalRoadClass.h"
7 
8 namespace Eegeo
9 {
10  namespace Resources
11  {
12  namespace Roads
13  {
15  {
16  RoadClassification(int numLanes, FunctionalRoadClass::Type functionalRoadClass)
17  : m_numLanes(numLanes)
18  , m_functionalRoadClass(functionalRoadClass)
19  {}
20 
21  int GetNumLanes() const { return m_numLanes; }
22  FunctionalRoadClass::Type GetFunctionalRoadClass() const { return m_functionalRoadClass; }
23 
24 
25  bool operator <(const RoadClassification& rhs) const
26  {
27  if (m_functionalRoadClass == rhs.m_functionalRoadClass)
28  return m_numLanes < rhs.m_numLanes;
29 
30  return m_functionalRoadClass < rhs.m_functionalRoadClass;
31  }
32 
33  bool operator ==(const RoadClassification& rhs) const
34  {
35  return m_numLanes == rhs.m_numLanes && m_functionalRoadClass == rhs.m_functionalRoadClass;
36  }
37 
38  private:
39  int m_numLanes;
40  FunctionalRoadClass::Type m_functionalRoadClass;
41  };
42  }
43  }
44 }