6 #include "BinaryParsing.h"
14 namespace ChunkedFileFormat
16 static const std::string ChunkedFileTag =
"HCFF";
17 static const std::string CellModelTag =
"CMDL";
18 static const std::string QuantizedCompressedMeshSetTag =
"QCMS";
19 static const std::string NavGraphTag =
"NAVG";
20 static const std::string RoadNamesTag =
"RDNM";
21 static const std::string LcmTerrainTag =
"LCMT";
22 static const std::string TreeTag =
"TREE";
23 static const std::string RoadTag =
"ROAD";
24 static const std::string RailTag =
"RAIL";
25 static const std::string TramlineTag =
"TRAM";
26 static const std::string Glowmap =
"GLOW";
27 static const std::string Jpeg =
"JPEG";
28 static const std::string PlacenameTag =
"PLAC";
29 static const std::string InteriorTag =
"INTR";
30 static const std::string InteriorMetadataTag =
"INTM";
31 static const std::string InteriorInstanceDataTag =
"INST";
32 static const std::string PropModelTag =
"PMDL";
33 static const std::string InteriorsFloorTag =
"FLOR";
34 static const std::string InteriorEntityTag =
"ENTI";
35 static const std::string InteriorMarkersTag =
"IMKR";
36 static const std::string TextTag =
"TEXT";
37 static const std::string CoverageManifestTag =
"CTMN";
38 static const std::string CoverageTreeListTag =
"CTLS";
39 static const std::string BlockCoverageTreeTag =
"BLCT";
40 static const std::string BuildingFootprintsListTag =
"BFLS";
41 static const std::string BuildingFootprintsTag =
"BDFP";
42 static const std::string HighlightGeometryTag =
"HIGH";
43 static const std::string ReferencedChunkStoreTag =
"REFS";
44 static const std::string ReferenceChunkTag =
"REFC";
45 static const std::string ThemeManifestTag =
"THMN";
46 static const std::string InteriorMaterialsTag =
"IMTS";
47 static const std::string InteriorMaterialTag =
"IMAT";
48 static const std::string ThemesTag =
"THMS";
49 static const std::string ThemeTag =
"THME";
50 static const std::string PlaceNameStylesTag =
"PSTL";
51 static const std::string PlaceNameStyleTag =
"PSTE";
52 static const std::string VehiclesTag =
"VCLS";
53 static const std::string VehicleTypeTag =
"VTLS";
54 static const std::string VehicleTag =
"VHCL";
55 static const std::string ThemeStatesTag =
"TSTS";
56 static const std::string ThemeStateTag =
"THST";
57 static const std::string ThemeLightingTag =
"THLI";
58 static const std::string ThemeTexturesTag =
"THTX";
59 static const std::string ThemeOverlayTag =
"THOV";
60 static const std::string ThemeLcmTexturesTag =
"THLT";
61 static const std::string BinaryFontInfoTag =
"BFIN";
62 static const std::string BinaryFontCommonTag =
"BFCO";
63 static const std::string BinaryFontPagesTag =
"BFPA";
64 static const std::string BinaryFontCharsTag =
"BFCH";
65 static const std::string BinaryFontKerningTag =
"BFKE";
66 static const std::string IndoorEntityTag =
"IENT";
74 static bool Requires_Ios5_Cpp11_Runtime_Fix;
76 bool TrySetStream(std::istream* bytes);
78 const std::string& GetCurrentTag()
const { Eegeo_ASSERT(!AtEndOfStream());
return m_currentTag; }
79 u32 GetHeaderVersion()
const { Eegeo_ASSERT(!AtEndOfStream());
return m_headerVersion; }
80 u32 GetCurrentBodyVersion()
const { Eegeo_ASSERT(!AtEndOfStream());
return m_currentBodyVersion; }
81 u32 GetCurrentBodyAlignment()
const { Eegeo_ASSERT(!AtEndOfStream());
return m_currentBodyAlignment; }
82 u32 GetCurrentNumOfChildren()
const { Eegeo_ASSERT(!AtEndOfStream());
return m_currentNumberOfChildren; }
83 u32 GetCurrentBodyLength()
const { Eegeo_ASSERT(!AtEndOfStream());
return static_cast<u32
>(m_currentBodyLength); }
85 bool HasAlignedData()
const;
88 bool AtEndOfStream()
const {
return m_pBytes->eof(); }
89 std::istream* GetCurrentBodyData();
90 bool AdvanceToNextChunk();
91 u32 SkipSubtree(std::string expectedTag);
95 std::istream* m_pBytes;
98 std::string m_currentTag;
99 u32 m_currentBodyVersion;
100 u32 m_currentBodyAlignment;
101 u32 m_currentNumberOfChildren;
102 std::istream::off_type m_currentBodyLength;
103 std::istream::pos_type m_currentBodyStreamPosition;
106 std::istream::pos_type GetPositionOfNextChunk();
107 bool TryReadRootChunkHeader();
108 bool TryReadChunkHeader(
bool isHcffRootChunk);