Class Cell (version 0.18)Description: The cell object A cell object consists of a set of shape containers (called layers), a set of child cell instances and auxiliary informations such as the parent instance list. A cell is identified through an index given to the cell upon instantiation. Cell instances refer to single instances or array instances. Both are encapsulated in the same object, the CellInstArray object. In the simple case, this object refers to a single instance. In the general case, this object may refer to a regular array of cell instances as well. Starting from version 0.16, the child_inst and erase_inst methods are no longer available since they were using index addressing which is no longer supported. Instead, instances are now addressed with the Instance reference objects.
Method Overview
[const] const ref Box bboxDescription: Retrieve the bounding box of the cell
[const] const ref Box bbox_per_layer( unsigned int layer_index )Description: Retrieve the per-layer bounding box of the cell
[const] unsigned int cell_indexDescription: The cell index accessor method
[const] unsigned int child_cellsDescription: Report the number of child cells The number of child cells (not child instances!) is reported. CAUTION: this method is SLOW!
[const] unsigned int child_instancesDescription: Number of child instances
clear( unsigned int layer_index )Description: Clear the shapes on the given layer
clear_instsDescription: Clear the instance list
clear_shapesDescription: Clear all shapes in the cell
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 destroyedDescription: 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.
yield unsigned int each_child_cellDescription: Iterate over all child cells This iterator will report the child cell indices, not every instance.
yield Instance each_instDescription: Iterate over all child instances (which may actually be instance arrays) Starting with version 0.15, this iterator delivers Instance objects rather than CellInstArray objects.
yield Instance each_overlapping_inst( Box b )Description: Region query for the instances in "overlapping" mode This will iterate over all child cell instances overlapping with the given region b. Starting with version 0.15, this iterator delivers Instance objects rather than CellInstArray objects.
[const] yield Shape each_overlapping_shape( unsigned int layer_index, Box box, unsigned int flags )Description: Iterate all shapes of a given layer that overlap the given box
[const] yield Shape each_overlapping_shape( unsigned int layer_index, Box box )Description: Iterate all shapes of a given layer that overlap the given box This call is equivalent to each_overlapping_shape(layer_index,box,RBA::Shapes::s_all). This convenience method has been introduced in version 0.16.
[const] yield unsigned int each_parent_cellDescription: Iterate over all parent cells This iterator will iterate over the parent cells, just returning their cell index.
yield ParentInstArray each_parent_instDescription: Iterate over the parent instance list (which may actually be instance arrays)
[const] yield Shape each_shape( unsigned int layer_index, unsigned int flags )Description: Iterate all shapes of a given layer This iterator is equivalent to 'shapes(layer).each'.
[const] yield Shape each_shape( unsigned int layer_index )Description: Iterate all shapes of a given layer This call is equivalent to each_shape(layer_index,RBA::Shapes::s_all). This convenience method has been introduced in version 0.16.
yield Instance each_touching_inst( Box b )Description: Region query for the instances in "touching" mode This will iterate over all child cell instances touching the given region b. Starting with version 0.15, this iterator delivers Instance objects rather than CellInstArray objects.
[const] yield Shape each_touching_shape( unsigned int layer_index, Box box )Description: Iterate all shapes of a given layer that touch the given box This call is equivalent to each_touching_shape(layer_index,box,RBA::Shapes::s_all). This convenience method has been introduced in version 0.16.
[const] yield Shape each_touching_shape( unsigned int layer_index, Box box, unsigned int flags )Description: Iterate all shapes of a given layer that touch the given box
erase( Instance inst )Description: Erase the instance given by the Instance object This method has been introduced in version 0.16. It can only be used in editable mode.
[const] unsigned int hierarchy_levelsDescription: Return the number of hierarchy levels below (expensive)
Instance insert( Instance inst )Description: Insert a cell instance given by another reference This method allows to copy instances taken from a reference (an Instance object). It has been added in version 0.16.
Instance insert( CellInstArray cell_inst_array )Description: Insert a cell instance (array) With version 0.16, this method returns an Instance object that represents the new instance. It's use is discouraged in readonly mode, since it invalidates other Instance references.
Instance insert( CellInstArray cell_inst_array, unsigned int property_id )Description: Insert a cell instance (array) with properties The property Id must be obtained from the Layout object's property_id method which associates a property set with a property Id. With version 0.16, this method returns an Instance object that represents the new instance. It's use is discouraged in readonly mode, since it invalidates other Instance references.
[const] bool is_leaf?Description: Tell if the cell is a leaf cell A cell is a leaf cell if there are no child instantiations.
[const] bool is_top?Description: Tell if the cell is a top-level cell A cell is a top-level cell if there are no parent instantiations.
[const] bool is_valid?( Instance instance )Description: Test if the given Instance object is still pointing to a valid object This method has been introduced in version 0.16. If the instance represented by the given reference has been deleted, this method returns false. If however, another instance has been inserted already that occupies the original instances position, this method will return true again.
[const] unsigned int parent_cellsDescription: Report the number of parent cells The number of parent cells (cells which reference our cell) is reported.
Instance replace( Instance instance, CellInstArray cell_inst_array )Description: Replace a cell instance (array) with a different one This method has been introduced in version 0.16. It can only be used in editable mode. The instance given by the instance object (first argument) is replaced by the given instance (second argument). The new object will not have any properties.
Instance replace( Instance instance, CellInstArray cell_inst_array, unsigned int property_id )Description: Replace a cell instance (array) with a different one with properties This method has been introduced in version 0.16. It can only be used in editable mode. The instance given by the instance object (first argument) is replaced by the given instance (second argument) with the given properties Id. The property Id must be obtained from the Layout object's property_id method which associates a property set with a property Id. The new object will not have any properties.
Instance replace_prop_id( Instance instance, unsigned int property_id )Description: Replace (or install) the properties of a cell This method has been introduced in version 0.16. It can only be used in editable mode. Changes the properties Id of the given instance or install a properties Id on that instance if it does not have one yet. The property Id must be obtained from the Layout object's property_id method which associates a property set with a property Id.
ref Shapes shapes( unsigned int )Description: Return the shapes list of the given layer This method allows to access the shapes list on a certain layer. If the layer does not exist yet, it is created.
swap( unsigned int layer_index1, unsigned int layer_index2 )Description: Swap the layers given
Instance transform( Instance instance, Trans trans )Description: Transform the instance given by the instance with the given transformation This method has been introduced in version 0.16. The original instance may be deleted and re-inserted by this method. Therefore, a new reference is returned. It is permitted in editable mode only.
Instance transform( Instance instance, CplxTrans trans )Description: Transform the instance given by the instance with the given complex transformation This method has been introduced in version 0.16. The original instance may be deleted and re-inserted by this method. Therefore, a new reference is returned. It is permitted in editable mode only.
|