From 8bbce50328e2114ac752d78dd7c49a95c50d61a6 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Mon, 23 Sep 2024 23:29:03 +0000 Subject: [PATCH] Expose `dbRecursiveShapeIterator::next(RecursiveShapeReceiver*)` This is extremely useful when you want the flexibility of pull-based iteration, but you also need notifications when entering and leaving cells. --- src/db/db/dbRecursiveShapeIterator.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/db/db/dbRecursiveShapeIterator.h b/src/db/db/dbRecursiveShapeIterator.h index 96761a1aa..072254e5d 100644 --- a/src/db/db/dbRecursiveShapeIterator.h +++ b/src/db/db/dbRecursiveShapeIterator.h @@ -772,6 +772,15 @@ class DB_PUBLIC RecursiveShapeIterator next (0); } + /** + * @brief Increments the iterator with `RecursiveShapeReceiver` customization + * + * This combines the flexibility of pull-based iteration with the + * extra notifications and iteration control provided by + * `RecursiveShapeReceiver`. + */ + void next (RecursiveShapeReceiver *receiver); + /** * @brief Comparison of iterators - equality */ @@ -881,7 +890,6 @@ class DB_PUBLIC RecursiveShapeIterator void skip_inst_iter_for_complex_region () const; void validate (RecursiveShapeReceiver *receiver) const; void start_shapes () const; - void next (RecursiveShapeReceiver *receiver); void next_shape (RecursiveShapeReceiver *receiver) const; void new_inst (RecursiveShapeReceiver *receiver) const; void new_inst_member (RecursiveShapeReceiver *receiver) const;