All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
RouteSimulationSessionRepository.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  {
13  namespace Simulation
14  {
16  {
17  public:
18  void AddSession(RouteSimulationSession* pSession);
19 
20  void RemoveSession(const RouteSimulationSession* pSession);
21 
22  std::vector<RouteSimulationSession*> GetSessions();
23 
24  void RegisterSessionRemovedCallback(IRouteSimulationSessionCallback* callback);
25  void UnregisterSessionRemovedCallback(IRouteSimulationSessionCallback* callback);
26 
27  private:
28  std::vector<RouteSimulationSession*> m_sessions;
29 
30  std::vector<IRouteSimulationSessionCallback*> m_sessionRemovedCallbacks;
31 
32  void FireCallbacks(std::vector<IRouteSimulationSessionCallback*>& callbacks, const RouteSimulationSession* session);
33  };
34  }
35  }
36 }