MCPcopy Create free account
hub / github.com/PDAL/PDAL / getCurrentPageAndOffset

Method getCurrentPageAndOffset

plugins/e57/libE57Format/src/CheckedFile.cpp:727–741  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

725}
726
727void CheckedFile::getCurrentPageAndOffset( uint64_t &page, size_t &pageOffset, OffsetMode omode )
728{
729 const uint64_t pos = position( omode );
730
731 if ( omode == Physical )
732 {
733 page = pos >> physicalPageSizeLog2;
734 pageOffset = static_cast<size_t>( pos & physicalPageSizeMask );
735 }
736 else
737 {
738 page = pos / logicalPageSize;
739 pageOffset = static_cast<size_t>( pos - page * logicalPageSize );
740 }
741}
742
743void CheckedFile::readPhysicalPage( char *page_buffer, uint64_t page )
744{

Callers

nothing calls this directly

Calls 1

positionFunction · 0.50

Tested by

no test coverage detected