MCPcopy Create free account
hub / github.com/crosspoint-reader/crosspoint-reader / writeTocEntry

Method writeTocEntry

lib/Epub/Epub/BookMetadataCache.cpp:304–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302}
303
304uint32_t BookMetadataCache::writeTocEntry(HalFile& file, const TocEntry& entry) const {
305 const uint32_t pos = file.position();
306 serialization::writeString(file, entry.title);
307 serialization::writeString(file, entry.href);
308 serialization::writeString(file, entry.anchor);
309 serialization::writePod(file, entry.level);
310 serialization::writePod(file, entry.spineIndex);
311 return pos;
312}
313
314// Note: for the LUT to be accurate, this **MUST** be called for all spine items before `addTocEntry` is ever called
315// this is because in this function we're marking positions of the items

Callers

nothing calls this directly

Calls 3

writeStringFunction · 0.85
writePodFunction · 0.85
positionMethod · 0.80

Tested by

no test coverage detected