diff --git a/src/Streams/StreamHierarchy.cpp b/src/Streams/StreamHierarchy.cpp index 7c461b9..ea99cda 100644 --- a/src/Streams/StreamHierarchy.cpp +++ b/src/Streams/StreamHierarchy.cpp @@ -28,7 +28,22 @@ void StreamHierarchy::read(FileFormatVersion aVersion) mCtx.mLogger.trace("schematicName = {}", schematicName); - ds.printUnknownData(9, getMethodName(this, __func__) + ": 1"); + ds.printUnknownData(7U, getMethodName(this, __func__) + ": 1"); + + const uint16_t lenSthInHierarchy2s = ds.readUint16(); + + mCtx.mLogger.trace("lenSthInHierarchy2s = {}", lenSthInHierarchy2s); + + for(std::size_t i{0U}; i < lenSthInHierarchy2s; ++i) + { + sthInHierarchy2s.push_back(dynamic_pointer_cast(parser.readStructure())); + + ds.printUnknownData(4U, getMethodName(this, __func__) + ": 1.53"); + + const std::string someName = ds.readStringLenZeroTerm(); + + mCtx.mLogger.trace("someName = {}", someName); + } const uint16_t lenNetDbIdMappings = ds.readUint16(); diff --git a/src/Streams/StreamHierarchy.hpp b/src/Streams/StreamHierarchy.hpp index 5ef3d40..b4c28b7 100644 --- a/src/Streams/StreamHierarchy.hpp +++ b/src/Streams/StreamHierarchy.hpp @@ -15,6 +15,7 @@ #include "Structures/StructNetDbIdMapping.hpp" #include "Structures/StructSomeHierarchyBase.hpp" #include "Structures/StructSthInHierarchy1.hpp" +#include "Structures/StructSthInHierarchy2.hpp" #include "Structures/StructSthInHierarchy3.hpp" #include "Structures/StructT0x5b.hpp" @@ -36,6 +37,7 @@ class StreamHierarchy : public Stream aVisitor.visit(*this); } + std::vector> sthInHierarchy2s; std::vector> netDbIdMappings; std::vector> sthInHierarchy3s; std::vector> t0x5bs; @@ -51,6 +53,15 @@ static std::string to_string(const StreamHierarchy& aObj) str += fmt::format("{}:\n", nameof::nameof_type()); + str += fmt::format("{}sthInHierarchy2s:\n", indent(1)); + for(size_t i = 0u; i < aObj.sthInHierarchy2s.size(); ++i) + { + if(aObj.sthInHierarchy2s[i]) + { + str += indent(fmt::format("[{}]: {}", i, aObj.sthInHierarchy2s[i]->to_string()), 2); + } + } + str += fmt::format("{}netDbIdMappings:\n", indent(1)); for(size_t i = 0u; i < aObj.netDbIdMappings.size(); ++i) {