diff --git a/genericfileelement.h b/genericfileelement.h index ac4696c..e4c8720 100644 --- a/genericfileelement.h +++ b/genericfileelement.h @@ -161,6 +161,7 @@ public: uint32 sizeLength() const; uint64 dataOffset() const; uint64 totalSize() const; + uint64 endOffset() const; uint64 maxTotalSize() const; implementationType* parent(); const implementationType* parent() const; @@ -410,6 +411,15 @@ inline uint64 GenericFileElement::totalSize() const return headerSize() + dataSize(); } +/*! + * \brief Returns the offset of the first byte which doesn't belong to this element anymore. + */ +template +inline uint64 GenericFileElement::endOffset() const +{ + return startOffset() + totalSize(); +} + /*! * \brief Returns maximum total size. *