diff --git a/src/db/gsiDeclDbRecursiveShapeIterator.cc b/src/db/gsiDeclDbRecursiveShapeIterator.cc index aec63a537..72a5d205c 100644 --- a/src/db/gsiDeclDbRecursiveShapeIterator.cc +++ b/src/db/gsiDeclDbRecursiveShapeIterator.cc @@ -23,6 +23,7 @@ #include "gsiDecl.h" #include "dbRecursiveShapeIterator.h" +#include "dbRegion.h" #include "tlGlobPattern.h" @@ -47,11 +48,31 @@ static db::RecursiveShapeIterator *new_si3 (const db::Layout &layout, const db:: return new db::RecursiveShapeIterator (layout, cell, layer, box, overlapping); } +static db::RecursiveShapeIterator *new_si3a (const db::Layout &layout, const db::Cell &cell, unsigned int layer, const db::Box &box, const db::Region &excl_region, bool overlapping) +{ + return new db::RecursiveShapeIterator (layout, cell, layer, box, excl_region, overlapping); +} + +static db::RecursiveShapeIterator *new_si3b (const db::Layout &layout, const db::Cell &cell, unsigned int layer, const db::Region ®ion, bool overlapping) +{ + return new db::RecursiveShapeIterator (layout, cell, layer, region, overlapping); +} + static db::RecursiveShapeIterator *new_si4 (const db::Layout &layout, const db::Cell &cell, const std::vector &layers, const db::Box &box, bool overlapping) { return new db::RecursiveShapeIterator (layout, cell, layers, box, overlapping); } +static db::RecursiveShapeIterator *new_si4a (const db::Layout &layout, const db::Cell &cell, const std::vector &layers, const db::Box &box, const db::Region &excl_region, bool overlapping) +{ + return new db::RecursiveShapeIterator (layout, cell, layers, box, excl_region, overlapping); +} + +static db::RecursiveShapeIterator *new_si4b (const db::Layout &layout, const db::Cell &cell, const std::vector &layers, const db::Region ®ion, bool overlapping) +{ + return new db::RecursiveShapeIterator (layout, cell, layers, region, overlapping); +} + static void select_cells1 (db::RecursiveShapeIterator *r, const std::vector &cells) { std::set cc; @@ -138,7 +159,49 @@ Class decl_RecursiveShapeIterator ("RecursiveShapeIt "\n" "This constructor has been introduced in version 0.23.\n" ) + - gsi::constructor ("new", &new_si4, + gsi::constructor ("new", &new_si3a, + "@brief Creates a recursive, single-layer shape iterator with a region.\n" + "@args layout, cell, layer, box, overlapping\n" + "@param layout The layout which shall be iterated\n" + "@param cell The initial cell which shall be iterated (including it's children)\n" + "@param layer The layer (index) from which the shapes are taken\n" + "@param box The basic search region\n" + "@param excl_region The region that is excluded from the basic search region\n" + "@param overlapping If set to true, shapes overlapping the search region are reported, otherwise touching is sufficient\n" + "\n" + "This constructor creates a new recursive shape iterator which delivers the shapes of " + "the given cell plus it's children from the layer given by the layer index in the \"layer\" parameter.\n" + "\n" + "The search is confined to the region given by the \"box\" and the \"excl_region\" parameter. " + "The box specifies the basic region. From that basic region the parts specified with \"excl_region\" " + "are excluded. The excluded region needs to be a rectilinear region.\n" + "\n" + "If \"overlapping\" is true, shapes whose " + "bounding box is overlapping the search region are reported. If \"overlapping\" is false, shapes whose " + "bounding box is touching the search region are reported.\n" + "\n" + "This constructor has been introduced in version 0.25.\n" + ) + + gsi::constructor ("new", &new_si3b, + "@brief Creates a recursive, single-layer shape iterator with a region.\n" + "@args layout, cell, layer, box, overlapping\n" + "@param layout The layout which shall be iterated\n" + "@param cell The initial cell which shall be iterated (including it's children)\n" + "@param layer The layer (index) from which the shapes are taken\n" + "@param region The search region\n" + "@param overlapping If set to true, shapes overlapping the search region are reported, otherwise touching is sufficient\n" + "\n" + "This constructor creates a new recursive shape iterator which delivers the shapes of " + "the given cell plus it's children from the layer given by the layer index in the \"layer\" parameter.\n" + "\n" + "The search is confined to the region given by the \"region\" parameter. The region needs to be a rectilinear region.\n" + "If \"overlapping\" is true, shapes whose " + "bounding box is overlapping the search region are reported. If \"overlapping\" is false, shapes whose " + "bounding box is touching the search region are reported.\n" + "\n" + "This constructor has been introduced in version 0.25.\n" + ) + + gsi::constructor ("new", &new_si4, "@brief Creates a recursive, multi-layer shape iterator with a region.\n" "@args layout, cell, layers, box, overlapping\n" "@param layout The layout which shall be iterated\n" @@ -157,7 +220,51 @@ Class decl_RecursiveShapeIterator ("RecursiveShapeIt "\n" "This constructor has been introduced in version 0.23.\n" ) + - gsi::method ("max_depth=", (void (db::RecursiveShapeIterator::*) (int)) &db::RecursiveShapeIterator::max_depth, + gsi::constructor ("new", &new_si4a, + "@brief Creates a recursive, multi-layer shape iterator with a region.\n" + "@args layout, cell, layers, box, overlapping\n" + "@param layout The layout which shall be iterated\n" + "@param cell The initial cell which shall be iterated (including it's children)\n" + "@param layers The layer indexes from which the shapes are taken\n" + "@param box The basic search region\n" + "@param excl_region The region that is excluded from the basic search region\n" + "@param overlapping If set to true, shapes overlapping the search region are reported, otherwise touching is sufficient\n" + "\n" + "This constructor creates a new recursive shape iterator which delivers the shapes of " + "the given cell plus it's children from the layers given by the layer indexes in the \"layers\" parameter.\n" + "While iterating use the \\layer method to retrieve the layer of the current shape.\n" + "\n" + "The search is confined to the region given by the \"box\" and the \"excl_region\" parameter. " + "The box specifies the basic region. From that basic region the parts specified with \"excl_region\" " + "are excluded. The excluded region needs to be a rectilinear region.\n" + "\n" + "If \"overlapping\" is true, shapes whose " + "bounding box is overlapping the search region are reported. If \"overlapping\" is false, shapes whose " + "bounding box is touching the search region are reported.\n" + "\n" + "This constructor has been introduced in version 0.23.\n" + ) + + gsi::constructor ("new", &new_si4b, + "@brief Creates a recursive, multi-layer shape iterator with a region.\n" + "@args layout, cell, layers, box, overlapping\n" + "@param layout The layout which shall be iterated\n" + "@param cell The initial cell which shall be iterated (including it's children)\n" + "@param layers The layer indexes from which the shapes are taken\n" + "@param region The search region\n" + "@param overlapping If set to true, shapes overlapping the search region are reported, otherwise touching is sufficient\n" + "\n" + "This constructor creates a new recursive shape iterator which delivers the shapes of " + "the given cell plus it's children from the layers given by the layer indexes in the \"layers\" parameter.\n" + "While iterating use the \\layer method to retrieve the layer of the current shape.\n" + "\n" + "The search is confined to the region given by the \"region\" parameter. The region needs to be a rectilinear region.\n" + "If \"overlapping\" is true, shapes whose " + "bounding box is overlapping the search region are reported. If \"overlapping\" is false, shapes whose " + "bounding box is touching the search region are reported.\n" + "\n" + "This constructor has been introduced in version 0.23.\n" + ) + + gsi::method ("max_depth=", (void (db::RecursiveShapeIterator::*) (int)) &db::RecursiveShapeIterator::max_depth, "@brief Specify the maximum hierarchy depth to look into\n" "@args depth\n" "\n"