All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
IndoorMapEntityInformationService.h
1 #pragma once
2 
3 #include "IIndoorMapEntityInformationService.h"
4 #include "Interiors.h"
5 #include "Types.h"
6 
7 namespace Eegeo
8 {
9  namespace IndoorMapEntityInformation
10  {
12  {
13  public:
15  IIndoorMapEntityInformationRefreshEvent& indoorMapEntityInformationRefreshEvent,
16  IIndoorMapEntityInformationChangedEvent& indoorMapEntityInformationChangedEvent,
17  const IIndoorMapEntityModelCollectionFactory& areaIndoorMapEntityModelCollectionFactory,
18  const IIndoorMapEntityModelCollectionFactory& instanceIndoorMapEntityModelCollectionFactory,
19  IndoorMapEntityModelRepository& indoorMapEntityModelRepository,
20  const IndoorMapEntityInformationModelFactory& indoorMapEntityInformationModelFactory,
21  IndoorMapEntityInformationModelRepository& indoorMapEntityInformationRepository,
22  const IIndoorMapEntityLoadStateProvider& indoorMapEntityLoadStateProvider,
25  );
26 
28 
29  IndoorMapEntityInformationModelId CreateInformationModel(const std::string& indoorMapId) override;
30 
31  bool InformationModelExists(IndoorMapEntityInformationModelId id) const override;
32 
33  void DestroyInformationModel(IndoorMapEntityInformationModelId id) override;
34 
35  const IndoorMapEntityInformationModel& GetInformationModel(
36  IndoorMapEntityInformationModelId id
37  ) const override;
38 
39  std::vector<IndoorMapEntityInformationModelId> GetInformationModelIdsForIndoorMap(
40  const std::string& indoorMapId
41  ) const override;
42 
43  std::vector<IndoorMapEntityModelId> GetEntityModelIdsForInformationModel(
44  IndoorMapEntityInformationModelId informationModelId
45  ) const override;
46 
47  bool IndoorMapEntityExists(IndoorMapEntityModelId indoorMapEntityModelId) const override;
48 
49  const IndoorMapEntityModel& GetIndoorMapEntity(const IndoorMapEntityModelId indoorMapEntityModelId) const override;
50 
51  IIndoorMapEntityInformationChangedEvent& GetIndoorMapEntityInformationChangedEvent() const override;
52  private:
53  void OnInteriorsCellResourceAdded(const Eegeo::Resources::Interiors::InteriorsCellResource& interiorsCellResource);
54  void OnRefresh();
55 
56  void OnIndoorMapEntityInformationModelAdded(const IndoorMapEntityInformationModel& indoorMapEntityInformationModel);
57  void OnIndoorMapEntityInformationModelRemoved(const IndoorMapEntityInformationModel& indoorMapEntityInformationModel);
58 
59  void AddEntityModelsForIndoorMapCell(const IndoorMapEntityInformationModel& indoorMapEntityInformationModel, const Streaming::MortonKey& cellKey);
60 
61  IIndoorMapEntityInformationRefreshEvent& m_indoorMapEntityInformationRefreshEvent;
62  IIndoorMapEntityInformationChangedEvent& m_indoorMapEntityInformationChangedEvent;
63 
64  const IIndoorMapEntityModelCollectionFactory& m_areaIndoorMapEntityModelCollectionFactory;
65  const IIndoorMapEntityModelCollectionFactory& m_instanceIndoorMapEntityModelCollectionFactory;
66  IndoorMapEntityModelRepository& m_indoorMapEntityModelRepository;
67  const IndoorMapEntityInformationModelFactory& m_indoorMapEntityInformationModelFactory;
68  IndoorMapEntityInformationModelRepository& m_indoorMapEntityInformationRepository;
69  const IIndoorMapEntityLoadStateProvider& m_indoorMapEntityLoadStateProvider;
70 
71  Eegeo::Resources::Interiors::InteriorsCellResourceObserver& m_interiorsCellResourceObserver;
73 
75  Helpers::TCallback0<IndoorMapEntityInformationService> m_indoorMapEntityInformationRefreshHandler;
76 
77  std::vector<IndoorMapEntityInformationModelId> m_informationModelIdsNeedingRefresh;
78 
79  IndoorMapEntityInformationModelId m_nextIndoorMapEntityInformationModelId;
80  };
81  }
82 }