cpp-common/bt2: rework `bt2::CommonIterator` (now `bt2::BorrowedObjectIterator`)
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 11 Dec 2023 20:03:50 +0000 (15:03 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 14 Dec 2023 15:57:04 +0000 (10:57 -0500)
commit56862ee2f64f9229a3dd38ac1b6d02a08eb951a6
treefd8d3d2abf1821d96123f5c48e6d85661316d4c7
parent3b1517b9a60ae6da454c188ad1961a339bb9ce70
cpp-common/bt2: rework `bt2::CommonIterator` (now `bt2::BorrowedObjectIterator`)

We don't need all the STL stuff (and constraints) currently, therefore
this iterator class may be simpler, making operator*() call
ContainerT::operator[]() directly instead of keeping a temporary wrapper
object and having a conditional for each iteration increment.

Making operator->() return a proxy because the iterator instance has no
persistent wrapper instance.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I1bdb254a37533b8524450b22aa7f25a4d8025c2c
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11236
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
src/Makefile.am
src/cpp-common/bt2/borrowed-object-iterator.hpp [new file with mode: 0644]
src/cpp-common/bt2/common-iterator.hpp [deleted file]
src/cpp-common/bt2/field-class.hpp
src/cpp-common/bt2/field-path.hpp
src/cpp-common/bt2/integer-range-set.hpp
src/cpp-common/bt2/value.hpp
This page took 0.024378 seconds and 4 git commands to generate.