MCPcopy Create free account
hub / github.com/comaps/comaps / GetAbsoluteOffsetAndSize

Method GetAbsoluteOffsetAndSize

libs/coding/files_container.cpp:87–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87std::pair<uint64_t, uint64_t> FilesContainerR::GetAbsoluteOffsetAndSize(Tag const & tag) const
88{
89 TagInfo const * p = GetInfo(tag);
90 if (!p)
91 MYTHROW(Reader::OpenException, ("Can't find section:", GetFileName(), tag));
92
93 auto reader = dynamic_cast<FileReader const *>(m_source.GetPtr());
94 uint64_t const offset = reader ? reader->GetOffset() : 0;
95 return std::make_pair(offset + p->m_offset, p->m_size);
96}
97
98FilesContainerBase::TagInfo const * FilesContainerBase::GetInfo(Tag const & tag) const
99{

Callers 2

LoadMethod · 0.80
UNIT_CLASS_TESTFunction · 0.80

Calls 3

GetFileNameFunction · 0.50
GetPtrMethod · 0.45
GetOffsetMethod · 0.45

Tested by 1

UNIT_CLASS_TESTFunction · 0.64