diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-05-22 18:59:55 +0200 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-05-29 18:58:20 +0200 |
| commit | f23f48172f2c95b053977e6fbddab35c22a4a953 (patch) | |
| tree | d227b33d54d1017ca3d0b5b064e02e3b2fd28d4d /src/buffer.hh | |
| parent | 0be8566dd7b40ebd8d463e948c920accde174679 (diff) | |
Buffer: add some method to work directly with coord instead of iterators
Diffstat (limited to 'src/buffer.hh')
| -rw-r--r-- | src/buffer.hh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/buffer.hh b/src/buffer.hh index 78271b20..fe116b3a 100644 --- a/src/buffer.hh +++ b/src/buffer.hh @@ -123,7 +123,11 @@ public: String string(const BufferIterator& begin, const BufferIterator& end) const; + ByteCount offset(const BufferCoord& c) const; + ByteCount distance(const BufferCoord& begin, const BufferCoord& end) const; + BufferCoord advance(BufferCoord coord, ByteCount count) const; bool is_valid(const BufferCoord& c) const; + bool is_end(const BufferCoord& c) const; BufferIterator begin() const; BufferIterator end() const; |
