All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ClippedRouteSectionPredicates.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Routes.h"
6 #include <functional>
7 #include "Streaming.h"
8 #include "ClippedRouteSection.h"
9 #include "SceneGraphCellRepository.h"
10 
11 namespace Eegeo
12 {
13  namespace Routes
14  {
15  namespace Fitting
16  {
17  namespace NavGraphConforming
18  {
19  class ClippedRouteSectionPredicates : public std::unary_function<Clipping::ClippedRouteSection, bool>
20  {
21  public:
23  {
24  public:
26  : m_key(key)
27  {
28  }
29 
30  bool operator() (const Clipping::ClippedRouteSection& clippedRouteSection) const
31  {
32  return clippedRouteSection.Key == m_key;
33  }
34  private:
36  };
37 
38  class CellInScene : public std::unary_function<Clipping::ClippedRouteSection, bool>
39  {
40  public:
41  CellInScene(const Streaming::SceneGraphCellRepository& sceneGraphCellRepository)
42  : m_sceneGraphCellRepository(sceneGraphCellRepository)
43  {
44 
45  }
46 
47  bool operator() (const Clipping::ClippedRouteSection& clippedRouteSection) const
48  {
49  return m_sceneGraphCellRepository.IsCellInSceneGraph(clippedRouteSection.Key);
50  }
51  private:
52  const Streaming::SceneGraphCellRepository& m_sceneGraphCellRepository;
53  };
54  };
55  }
56  }
57  }
58 }