Add QCircularBuffer and test
authorSean Harmer <sean.harmer@kdab.com>
Fri, 11 Apr 2014 08:09:54 +0000 (09:09 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 17 Apr 2014 08:40:54 +0000 (10:40 +0200)
commitc7ce596dbd3d465c0d0c83b1e020e5eaae32892d
tree2120ba94170bb4ddf710a4f5a734ba80df497c1a
parent0fb05e7f6fa326f9e8821e33a0aef1df3c6a55b9
Add QCircularBuffer and test

This is different to QtCore's QRingBuffer. QRingBuffer deals with
raw bytes with a non-contiguous list of QByteArrays. QCircularBuffer
is strongly typed and the data is guaranteed to be stored in a
contiguous block of memory. Although the start/end of the buffer
may not correspond to the start/end of the block of memory once it
has reached capacity and wraps around.

Done-with: Andreas Hartmetz and Marc Mutz
Change-Id: Id03ad308b13fb359604d19474d892ff22c1e9b93
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
src/core/doc/src/snippets/code/src_core_qcircularbuffer.cpp [new file with mode: 0644]
src/core/resources/qcircularbuffer.h [new file with mode: 0644]
src/core/resources/qcircularbuffer.qdoc [new file with mode: 0644]
src/core/resources/resources.pri
tests/auto/core/core.pro
tests/auto/core/qcircularbuffer/qcircularbuffer.pro [new file with mode: 0644]
tests/auto/core/qcircularbuffer/tst_qcircularbuffer.cpp [new file with mode: 0644]
tests/benchmarks/benchmarks.pro
tests/benchmarks/core/core.pro [new file with mode: 0644]
tests/benchmarks/core/qcircularbuffer/qcircularbuffer.pro [new file with mode: 0644]
tests/benchmarks/core/qcircularbuffer/tst_bench_qcircularbuffer.cpp [new file with mode: 0644]