KLayout Manual: Main Index » Class Index » API reference - Class RecursiveShapeIteratorAPI reference - Class RecursiveShapeIteratorNotation used in Ruby API documentation 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. Public constructors
Public methods
Deprecated methods (protected, public, static, non-static and constructors)
Detailed description[const] bool !=(const RecursiveShapeIterator other)Description: Comparison of iterators - inequality Two iterators are not equal if they do not point to the same shape. [const] bool ==(const RecursiveShapeIterator other)Description: Comparison of iterators - equality Two iterators are equal if they point to the same shape. [const] void assign(const 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_endDescription: End of iterator predicate This method is deprecated. Use method 'at_end?' instead [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_indexDescription: Get the current cell's index void createDescription: Ensures the C++ object is created Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. void destroyDescription: 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: Returns a value indicating whether the object was already 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 dupDescription: Creates a copy of self [const] bool is_const_object?Description: Returns a value indicating whether the reference is a const reference This method returns true, if self is a const reference. In that case, only const methods may be called on self. [const] ICplxTrans itransDescription: 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. void max_depth=(int depth)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. [static] RecursiveShapeIterator newDescription: Creates a new object of this class void nextDescription: Increment the iterator This moves the iterator to the next shape inside the search scope. [const] Shape shapeDescription: 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. void shape_flags=(unsigned int flags)Description: Specify the shape selection flags The flags are the same then being defined in Shapes (the default is RBA::Shapes::SAll). The flags must be specified before the shapes are being retrieved. [const] CplxTrans transDescription: 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. |