From 5a15d956e8d0e6bb1d47f2c79a4f8a2ba135f884 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sat, 21 Nov 2015 01:07:52 +0100 Subject: [PATCH] added endOffset() --- genericfileelement.h | 10 ++++++++++ 1 file changed, 10 insertions(+) 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. *