All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
FittedRouteSection.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Routes.h"
6 #include "LocalRouteVertex.h"
7 #include "MortonKey.h"
8 
9 #include <vector>
10 #include <string>
11 #include <sstream>
12 
13 namespace Eegeo
14 {
15  namespace Routes
16  {
17  namespace Fitting
18  {
20  {
21  FittedRouteSection(const Eegeo::Streaming::MortonKey& key, const std::vector<LocalRouteVertex>& localVertices)
22  : m_key(key)
23  , m_localVertices(localVertices)
24  {
25  }
26 
27  const std::vector<LocalRouteVertex>& GetLocalVertices() const { return m_localVertices; }
28  const Eegeo::Streaming::MortonKey& GetKey() const { return m_key; }
29  bool IsEmpty() const { return m_localVertices.empty(); }
30 
31  std::string DebugString() const
32  {
33  std::stringstream str;
34  str << m_key.ToString() << ": ";
35  if (!IsEmpty())
36  {
37  str << m_localVertices.front().GetRouteParam() << " -> " << m_localVertices.back().GetRouteParam();
38  }
39 
40  return str.str();
41  }
42  private:
44  std::vector<LocalRouteVertex> m_localVertices;
45 
46  };
47  }
48  }
49 }