All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
CoverageTreeModule.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include <string>
6 
7 #include "Types.h"
8 #include "CoverageTrees.h"
9 #include "BlockCoverageTrees.h"
10 #include "Web.h"
11 #include "Buildings.h"
12 #include "Terrain.h"
13 #include "Roads.h"
14 #include "PlaceNames.h"
15 #include "Interiors.h"
16 #include "Streaming.h"
17 #include "NativeUIFactories.h"
18 #include "IEegeoErrorHandler.h"
19 #include "Modules.h"
20 #include "ICallback.h"
21 #include "IFileIO.h"
22 #include "ConfigSections.h"
23 #include <vector>
24 
25 namespace Eegeo
26 {
27  namespace Modules
28  {
29  namespace Map
30  {
32  {
33  public:
35  (
36  Streaming::CoverageTrees::ICoverageTreeManifestLoader* pCoverageTreeManifestLoader,
37  Streaming::CoverageTrees::CoverageTreeDownloadFailedHandler* pCoverageTreeDownloadFailedHandler,
38  Streaming::CoverageTrees::CoverageTreeManifestNotifier* pCoverageTreeManifestNotifier,
39  Streaming::CoverageTrees::ICoverageTreeResourceUpdater* pCoverageTreeResourceUpdater
40  );
42 
43  static CoverageTreeModule* Create(Web::IWebLoadRequestFactory& webRequestFactory,
44  const Config::CoverageTreeConfigSection& coverageTreeConfig,
45  Layers::BuildingStreamingModule& buildingStreamingModule,
46  Layers::TerrainStreamingModule& terrainStreamingModule,
47  Layers::TransportStreamingModule& transportStreamingModule,
48  Layers::PlaceNamesStreamingModule& placeNamesStreamingModule,
49  Layers::InteriorsStreamingModule& interiorsStreamingModule,
50  UI::NativeAlerts::IAlertBoxFactory& alertBoxFactory,
51  Web::IConnectivityService& connectivityService,
52  IEegeoErrorHandler* pErrorHandler,
53  Streaming::StreamingController& streamingController,
54  bool enableInteriors);
55 
56  void LoadCoverageTreeManifest(const std::string& url);
57 
58  bool LoadingComplete() const;
59  float GetProgress() const;
60 
61  Streaming::CoverageTrees::ICoverageTreeManifestLoader& GetCoverageTreeLoader() const { return *m_pCoverageTreeManifestLoader; }
62  Streaming::CoverageTrees::CoverageTreeManifestNotifier& CoverageTreeManifestNotifier() const { return *m_pCoverageTreeManifestNotifier; }
63 
64  private:
65 
66  void ManifestLoadedHandler(const Streaming::CoverageTrees::CoverageTreeManifest& manifest);
67 
68  Streaming::CoverageTrees::ICoverageTreeManifestLoader* m_pCoverageTreeManifestLoader;
69 
70  Streaming::CoverageTrees::CoverageTreeDownloadFailedHandler* m_pCoverageTreeDownloadFailedHandler;
71 
72  Streaming::CoverageTrees::CoverageTreeManifestNotifier* m_pCoverageTreeManifestNotifier;
73 
74  Streaming::CoverageTrees::ICoverageTreeResourceUpdater* m_pCoverageTreeResourceUpdater;
75 
77  CoverageTreeManifestLoadedCallback m_manifestLoadedCallback;
78 
79  bool m_loadingComplete;
80  };
81  }
82  }
83 }
84