+ DocIterator() = default;
+
+ // We could be able to get rid of this if only every BufferView were
+ // associated to a buffer on construction.
+ explicit DocIterator(Buffer *buf)
+ : buffer_(buf)
+ {}
+
+ /// access to owning buffer
+ Buffer * buffer() const { return buffer_; }
+ /// access to owning buffer
+ void setBuffer(Buffer * buf) { buffer_ = buf; }
+
+ /// Clone this for given \p buffer.
+ /// \p buffer must be a clone of buffer_.
+ DocIterator clone(Buffer * buffer) const;