Class Layout (version 0.18)Description: The layout object The layout object basically wraps the cell graphs and adds functionality for managing cell names and layer names. The cell graph is a container for the cells and their hierarchical arrangement. The cell graph is constructed by creating cells and adding child instances to it.
Method Overview
unsigned int add_cell( string name )Description: Add a cell with the given name
[const] RecursiveShapeIterator begin_shapes( unsigned int cell_index, unsigned int layer )Description: Delivers a recursive shape iterator for the shapes below the given cell on the given layer For details see the description of the RecursiveShapeIterator class. This method has been added in version 0.18.
[const] RecursiveShapeIterator begin_shapes_overlapping( unsigned int cell_index, unsigned int layer, Box region )Description: Delivers a recursive shape iterator for the shapes below the given cell on the given layer using a region search For details see the description of the RecursiveShapeIterator class. This version gives an iterator delivering shapes whose bounding box overlaps the given region. This method has been added in version 0.18.
[const] RecursiveShapeIterator begin_shapes_touching( unsigned int cell_index, unsigned int layer, Box region )Description: Delivers a recursive shape iterator for the shapes below the given cell on the given layer using a region search For details see the description of the RecursiveShapeIterator class. This version gives an iterator delivering shapes whose bounding box touches the given region. This method has been added in version 0.18.
ref Cell cell( unsigned int i )Description: Address a cell by index
unsigned int cell_by_name( string name )Description: Get the cell index for a given name Returns the cell index for the cell with the given name. If no cell with this name exists, an exception is thrown.
[const] string cell_name( unsigned int index )Description: Get the name for a cell with the given index
[const] unsigned int cellsDescription: Return the number of cells
[const] double dbuDescription: Database unit read accessor
dbu=( double dbu )Description: Database unit write accessor
delete_layer( unsigned int layer_index )Description: Delete a layer This does free the shapes of the cells and remembers the layer's index for recycling.
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 ref Cell each_cellDescription: Iterate the unsorted cell list
yield unsigned int each_cell_bottom_upDescription: Iterate the bottom-up sorted cell list In bottom-up traversal a cell is not delivered before the last child cell of this cell has been delivered. The bottom-up iterator does not deliver cells but cell indices actually.
yield unsigned int each_cell_top_downDescription: Iterate of the top-down sorted cell list The top-down cell list has the property of delivering all cells before they are instantiated. In addition the first cells are all top cells. There is at least one top cell. The top-down iterator does not deliver cells but cell indices actually.
yield unsigned int each_top_cellDescription: Iterate the top cells A layout may have an arbitrary number of top cells. The usual case however is that there is one top cell.
end_changesDescription: Cancel the "in changes" state (see "start_changes")
[const] const ref LayerInfo get_info( unsigned int index )Description: Get the info structure for a specified layer
bool has_cell?( string name )Description: Tell, if the cell with a given name exists Returns true, if the layout has a cell with the given name
unsigned int insert_layer( LayerInfo props )Description: Insert a new layer with the given properties
insert_layer_at( unsigned int index, LayerInfo props )Description: Insert a new layer with the given properties at the given index
unsigned int insert_special_layer( LayerInfo props )Description: Insert a new special layer with the given properties Special layers can be used to represent objects that should not participate in normal viewing or other related operations. Special layers are not reported as valid layers.
insert_special_layer_at( unsigned int index, LayerInfo props )Description: Insert a new special layer with the given properties at the given index See insert_special_layer for a description of special layers.
[const] bool is_special_layer?( unsigned int layer_index )Description: Tell, if a layer index is a special layer index
[const] bool is_valid_layer?( unsigned int layer_index )Description: Tell, if a layer index is a valid index
[const] unsigned int layersDescription: Return the number of layers The number of layers reports the maximum (plus 1) layer index used so far. Not all of the layers with an index in the range of 0 to layers-1 needs to be a valid layer. These layers can be either valid, special or unused. Use is_valid_layer? and is_special_layer? to test for the first two states.
[const] [ ] properties( unsigned int properties_id )Description: Get the properties set for a given properties ID Basically performs the backward conversion of the 'properties_id' method. Given a properties ID, returns the properties set as an array of pairs of variants. In this array, each key and the value are stored as pairs (arrays with two elements). If the properties ID is not valid, an empty array is returned.
unsigned int properties_id( properties[ ] )Description: Get the properties ID for a given properties set Before a set of properties can be attached to a shape, it must be converted into an ID that is unique for that set. The properties set must be given as a list of pairs of variants, each pair describing a name and a value. The name acts as the key for the property and does not need to be a string (it can be an integer or double value as well). The backward conversion can be performed with the 'properties' method.
LayerMap read( string filename )Description: Load the layout from the given file The format of the file is determined automatically and automatic unzipping is provided. No particular options can be specified. This method has been added in version 0.18.
LayerMap read( string filename, LoadLayoutOptions options )Description: Load the layout from the given file with options The format of the file is determined automatically and automatic unzipping is provided. In this version, some reader options can be specified. This method has been added in version 0.18.
rename_cell( unsigned int index, string name )Description: Rename the cell with the given index to the given name
set_info( unsigned int index, LayerInfo props )Description: Set the info structure for a specified layer
start_changesDescription: Signal the start of an operation bringing the layout into invalid state This method should be called whenever the layout is about to be brought into an invalid state. After calling this method, under_construction returns false which tells foreign code (such as update which might be called asynchroneously for example because of a repaint event) not to use this layout object. This state is cancelled by the end_changes method. The start_changes method can be called multiple times and must be cancelled the same number of times. Using this method is only required currently if a repaint event may happen while the layout object is in an invalid state.
[const] bool under_constructionDescription: Tell if the layout object is under construction A layout object is either under construction if a transaction is ongoing or the layout is brought into invalid state by "start_changes".
updateDescription: Update the internals of the layout This method updates the internal state of the layout. Usually this is done automatically This method is provided to ensure this state explicitly.
[const] write( string filename, bool gzip, SaveLayoutOptions options )Description: Write the layout to a stream file
|