Class RecursiveShapeIterator (version 0.18)

Description: An iterator delivering shapes that touch or overlap the given region recursively

The iterator can be obtained from a layout, specifying a starting cell, a layer and optionally a region. It simplifies retrieval of shapes from a geometrical region while considering subcells as well. Some options can be specified, i.e. the level to which to look into or shape classes and shape properties. The shapes are retrieved by using the shape method, next moves to the next shape and at_end tells, if the iterator has move shapes to deliver.

Layout offers three methods to get these iterators: begin_shapes, begin_shapes_touching and begin_shapes_overlapping.

This class has been introduced in version 0.18.

Class overview

Index

Method Overview

max_depth=( unsigned int )Specify the maximum hierarchy depth to look into
shape_flags=( unsigned int )Specify the shape selection flags
[const] const ref CplxTrans transGet the current transformation by which the shapes must be transformed into the initial cell
[const] ICplxTrans itransGet the current transformation by which the shapes must be transformed into the initial cell
[const] Shape shapeGet the current shape
[const] bool at_endEnd of iterator predicate
[const] unsigned int cell_indexGet the current cell's index
nextIncrement the iterator
[const] bool ==( RecursiveShapeIterator )Comparison of iterators - equality
[const] bool !=( RecursiveShapeIterator )Comparison of iterators - inequality
assign( RecursiveShapeIterator other )Assign the contents of another object to self
[const] RecursiveShapeIterator dupCreates a copy of self.
destroyExplicitly destroy the object
[const] bool destroyedTell, if the object was destroyed

[const] bool !=( RecursiveShapeIterator )

Description: Comparison of iterators - inequality

Two iterators are not equal if they do not point to the same shape.

[const] bool ==( RecursiveShapeIterator )

Description: Comparison of iterators - equality

Two iterators are equal if they point to the same shape.

assign( RecursiveShapeIterator other )

Description: Assign the contents of another object to self

This method assigns the contents of another object to self. This is a deep copy that does not only copy the reference but the actual content.

[const] bool at_end

Description: End of iterator predicate

Returns true, if the iterator is at the end of the sequence

[const] unsigned int cell_index

Description: Get the current cell's index

destroy

Description: Explicitly destroy the object

Explicitly destroy the object on C++ side if it was owned by the Ruby interpreter. Subsequent access to this object will throw an exception. If the object is not owned by Ruby, this method will do nothing.

[const] bool destroyed

Description: Tell, if the object was destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

[const] RecursiveShapeIterator dup

Description: Creates a copy of self.

[const] ICplxTrans itrans

Description: Get the current transformation by which the shapes must be transformed into the initial cell

The shapes delivered are not transformed. Instead, this transformation must be applied to get the shape in the coordinate system of the top cell. This method delivers the integer version which is not accurate in the strict sense but delivers integer coordinate shapes. This method is somewhat slower than the 'trans' method.

max_depth=( unsigned int )

Description: Specify the maximum hierarchy depth to look into

A depth of 0 instructs the iterator to deliver only shapes from the initial cell. The depth must be specified before the shapes are being retrieved.

next

Description: Increment the iterator

This moves the iterator to the next shape inside the search scope.

[const] Shape shape

Description: Get the current shape

Returns the shape currently referred to by the recursive iterator. This shape is not transformed yet and is located in the current cell.

shape_flags=( unsigned int )

Description: Specify the shape selection flags

The flags are the same then being defined in Shapes (the default is Shapes.s_all). The flags must be specified before the shapes are being retrieved.

[const] const ref CplxTrans trans

Description: Get the current transformation by which the shapes must be transformed into the initial cell

The shapes delivered are not transformed. Instead, this transformation must be applied to get the shape in the coordinate system of the top cell.