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

Method getTocItem

lib/Epub/Epub.cpp:809–821  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

807}
808
809BookMetadataCache::TocEntry Epub::getTocItem(const int tocIndex) const {
810 if (!bookMetadataCache || !bookMetadataCache->isLoaded()) {
811 LOG_DBG("EBP", "getTocItem called but cache not loaded");
812 return {};
813 }
814
815 if (tocIndex < 0 || tocIndex >= bookMetadataCache->getTocCount()) {
816 LOG_DBG("EBP", "getTocItem index:%d is out of range", tocIndex);
817 return {};
818 }
819
820 return bookMetadataCache->getTocEntry(tocIndex);
821}
822
823int Epub::getTocItemsCount() const {
824 if (!bookMetadataCache || !bookMetadataCache->isLoaded()) {

Callers 7

createSectionFileMethod · 0.80
launchKOReaderSyncMethod · 0.80
renderStatusBarMethod · 0.80
renderMethod · 0.80
renderMethod · 0.80
loopMethod · 0.80
renderMethod · 0.80

Calls 3

getTocCountMethod · 0.80
getTocEntryMethod · 0.80
isLoadedMethod · 0.45

Tested by

no test coverage detected