- Timestamp:
- 03/05/10 14:16:21 (6 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
FalconView/trunk/public/fvw_core/GeodataDataSources/LibkmlDataSource.h
r2277 r2279 31 31 #error "Single-threaded COM objects are not properly supported on Windows CE platform, such as the Windows Mobile platforms that do not include full DCOM support. Define _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA to force ATL to support creating single-thread COM object's and allow use of it's single-threaded COM object implementations. The threading model in your rgs file was set to 'Free' as that is the only threading model supported in non DCOM Windows CE platforms." 32 32 #endif 33 34 class CKMLImageDataResource; 35 36 class CKmlImageCache 37 { 38 std::map<std::string, CKMLImageDataResource*> m_imageCache; 39 40 public: 41 void Insert(const std::string& imageId, CKMLImageDataResource *pResource); 42 CKMLImageDataResource* Find(const std::string& imageId); 43 void Clear(); 44 }; 33 45 34 46 // CLibkmlDataSource … … 44 56 public IDispatchImpl<IFvDataSourceEdit, &__uuidof(IFvDataSourceEdit), &LIBID_FvDataSourcesLib, /* wMajor = */ 1, /* wMinor = */ 0>, 45 57 public IDispatchImpl<IUIState, &__uuidof(IUIState), &LIBID_FvDataSourcesLib, /* wMajor = */ 1, /* wMinor = */ 0>, 58 public IDispatchImpl<IFvDataSourceCallback, &__uuidof(IUIState), &LIBID_FvDataSourcesLib, /* wMajor = */ 1, /* wMinor = */ 0>, 46 59 public CComErrorHandler 47 60 { … … 71 84 COM_INTERFACE_ENTRY(IRegionatedKMLContainer) 72 85 COM_INTERFACE_ENTRY(IUIState) 86 COM_INTERFACE_ENTRY(IFvDataSourceCallback) 73 87 END_COM_MAP() 74 88 … … 88 102 CInternalObjectRegistry::UnregisterObject(m_handle); 89 103 m_b_objectFinalReleased = true; 104 105 m_imageCache.Clear(); 90 106 } 91 107 … … 157 173 STDMETHOD(raw_GetImageByIdentifier)(BSTR identifier, VARIANT* imageData); 158 174 175 // IFvDataSourceCallback Methods 176 public: 177 STDMETHOD(raw_DataSourceChanged)(); 178 159 179 // IFvDataSourceEdit Methods 160 180 public: … … 185 205 kmlengine::KmzFilePtr m_kmz_file; // populate this if KMZ 186 206 ULONG m_internalRefs; 187 STRING_TO_VARIANT_MAPm_imageCache;207 CKmlImageCache m_imageCache; 188 208 DATA_SOURCE_CALLBACK_VECTOR m_callbacks; 189 209 bool m_b_objectFinalReleased; … … 200 220 static std::string s_dumpFile; 201 221 static void MaybeDumpKML(std::string& kml); 202 203 static ULONG s_nextMemFile;204 222 }; 205 223
