All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
IndoorMapFloorOutlineInformationService.h
1 // Copyright eeGeo Ltd (2012-2019), All Rights Reserved
2 
3 #pragma once
4 
5 #include "IndoorMapFloorOutlineInformation.h"
6 #include "IIndoorMapFloorOutlineInformationService.h"
7 #include "Interiors.h"
8 #include "Types.h"
9 
10 namespace Eegeo
11 {
12  namespace IndoorMapFloorOutlineInformation
13  {
15  {
16  public:
18  Resources::Interiors::InteriorsModelRepository& interiorsModelRepository,
19  const IndoorMapFloorOutlineInformationModelFactory& indoorMapFloorOutlineInformationModelFactory,
20  IndoorMapFloorOutlineInformationRepository& indoorMapFloorOutlineInformationRepository,
21  IndoorMapFloorOutlineRepository& indoorMapFloorOutlineRepository,
22  IIndoorMapFloorOutlineInformationLoadedEvent& indoorMapFloorOutlineInformationLoadedEvent
23  );
24 
26 
27  void Update();
28 
29  IndoorMapFloorOutlineInformationModelId CreateInformationModel(const std::string& indoorMapId, const int indoorMapFloorId) override;
30 
31  void DestroyInformationModel(IndoorMapFloorOutlineInformationModelId indoorMapFloorOutlineModelId) override;
32 
33  bool InformationModelExists(IndoorMapFloorOutlineInformationModelId indoorMapFloorOutlineModelId) const override;
34 
35  const IndoorMapFloorOutlineInformationModel& GetInformationModel(IndoorMapFloorOutlineInformationModelId indoorMapFloorOutlineModelId) const override;
36 
37  const IndoorMapFloorOutline& GetOutlineForInformationModel(IndoorMapFloorOutlineInformationModelId indoorMapFloorOutlineModelId) const override;
38 
39  void RegisterInformationLoadedEvent(Helpers::ICallback1<const IndoorMapFloorOutlineInformationModelId>& callback) const override;
40 
41  void UnregisterInformationLoadedEvent(Helpers::ICallback1<const IndoorMapFloorOutlineInformationModelId>& callback) const override;
42 
43  private:
44  void AddOutlineForInterior(const IndoorMapFloorOutlineInformationModel& indoorMapFloorOutlineInformationModel, const Resources::Interiors::InteriorsModel& interiorsModel);
45 
46  void OnInteriorModelAdded(Resources::Interiors::InteriorsModel& interiorsModel);
47  void OnIndoorMapFloorOutlineInformationModelAdded(const IndoorMapFloorOutlineInformationModel& indoorMapFloorOutlineInformationModel);
48 
49  Resources::Interiors::InteriorsModelRepository& m_interiorsModelRepository;
50  const IndoorMapFloorOutlineInformationModelFactory& m_indoorMapFloorOutlineInformationModelFactory;
51  IndoorMapFloorOutlineInformationRepository& m_indoorMapFloorOutlineInformationRepository;
52  IndoorMapFloorOutlineRepository& m_indoorMapFloorOutlineRepository;
53  IIndoorMapFloorOutlineInformationLoadedEvent& m_indoorMapFloorOutlineInformationLoadedEvent;
54 
55  std::vector<IndoorMapFloorOutlineInformationModelId> m_informationModelLoadedPendingCallbacks;
56 
57  IndoorMapFloorOutlineInformationModelId m_nextIndoorMapFloorOutlineInformationModelId;
58 
60  };
61  }
62 }