All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
RouteService.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "Routes.h"
7 #include <vector>
8 
9 namespace Eegeo
10 {
11  namespace Routes
12  {
14  {
15  RouteRepository& m_routeRepository;
16  RouteStyleRepository& m_routeStyleRepository;
17  View::RouteViewFactoryRepository& m_routeViewFactoryRepository;
18  RouteFactory& m_routeFactory;
19  View::IRouteViewFactory& m_defaultRouteViewFactory;
20 
21  void AddRoute(const Route& route, const Style::RouteStyle& routeStyle, View::IRouteViewFactory* pViewFactory);
22 
23  public:
24  RouteService(RouteRepository& routeRepository,
25  RouteStyleRepository& routeStyleRepository,
26  View::RouteViewFactoryRepository& routeViewFactoryRepository,
27  RouteFactory& routeFactory,
28  View::IRouteViewFactory& defaultRouteViewFactory
29  );
30 
31  Route* CreateRoute(const std::vector<RouteVertex>& points,
32  const Style::RouteStyle& routeStyle,
33  bool fittingToNavigationGraphEnabled
34  );
35 
36  Route* CreateRoute(const std::vector<RouteVertex>& points,
37  const Style::RouteStyle& routeStyle,
38  bool fittingToNavigationGraphEnabled,
39  View::IRouteViewFactory* viewFactory
40  );
41 
42  Route* CreateRoute(const Clipping::ClippedRoute& clippedRoute,
43  const std::vector<RouteVertex>& clippedRouteVertices,
44  const Style::RouteStyle& routeStyle,
45  bool fittingToNavigationGraphEnabled
46  );
47 
48  Route* CreateRoute(const Clipping::ClippedRoute& clippedRoute,
49  const std::vector<RouteVertex>& clippedRouteVertices,
50  const Style::RouteStyle& routeStyle,
51  bool fittingToNavigationGraphEnabled,
52  View::IRouteViewFactory* viewFactory
53  );
54 
55  Route* CreateRoute(const Clipping::ClippedRoute& clippedRoute,
56  const std::vector<RouteVertex>& clippedRouteVertices,
57  const Style::RouteStyle& routeStyle,
58  bool fittingToNavigationGraphEnabled,
59  View::IRouteViewFactory* viewFactory,
60  bool shouldProjectToTerrain
61  );
62 
63  void SetRouteStyle(const Route* pRoute, Style::RouteStyle routeStyle);
64 
65  void RegenerateRoute(const Route* pRoute);
66 
67  void DestroyRoute(const Route* routeToDestroy);
68 
69  void DestroyAllRoutes();
70  };
71  }
72 }