Class ObjectInstPath (version 0.18)

Description: A class describing a selected shape or instance

A shape or instance is addressed by a path which describes all instances leading to the specified object. These instances are described through InstElement objects, which describe the instance and, in case of array instances, the specific array member. For shapes, additionally the layer and the shape itself is specified. The ObjectInstPath objects encapsulates both forms, which can be distinguished with the is_cell_inst? attribute.

Class overview

Index

Method Overview

[const] unsigned int cv_indexAccessor to the cellview index that describes which cell view the shape or instance is located in
[const] unsigned int cell_indexAccessor to the cell index of the cell that the selection applies to.
[const] unsigned int sourceReturns to the cell index of the cell that the selected element resides inside.
[const] CplxTrans transAccessor to the transformation applicable for the shape.
[const] CplxTrans source_transAccessor to the transformation applicable for an instance and shape.
[const] unsigned int layerAccessor to the layer index that describes which layer the selected shape is on
[const] const ref Shape shapeAccessor to the shape object that describes the selected shape geometrically
[const] const ref Instance instDeliver the instance represented by this selection
[const] bool is_cell_inst?True, if this selection represents a cell instance
[const] unsigned long seqThe sequence number
[const] unsigned int path_lengthReturns the length of the path (number of elements delivered by each_inst)
[const] const ref InstElement path_nth( unsigned int n )Returns the nth element of the path (similar to each_inst but with direct access through the index)
[const] yield const ref InstElement each_instYield the instantiation path
assign( ObjectInstPath other )Assign the contents of another object to self
[const] ObjectInstPath dupCreates a copy of self.
destroyExplicitly destroy the object
[const] bool destroyedTell, if the object was destroyed

assign( ObjectInstPath 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] unsigned int cell_index

Description: Accessor to the cell index of the cell that the selection applies to.

This method returns the cell index that describes which cell the selected shape is located in or the cell whose instance is selected if is_cell_inst? is true.

[const] unsigned int cv_index

Description: Accessor to the cellview index that describes which cell view the shape or instance is located in

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] ObjectInstPath dup

Description: Creates a copy of self.

[const] yield const ref InstElement each_inst

Description: Yield the instantiation path

The instantiation path describes by an sequence of InstElement objects the path by which the cell containing the selected shape is found from the cell view's current cell. If this object represents an instance, the path will contain the selected instance as the last element. The elements are delivered top down.

[const] const ref Instance inst

Description: Deliver the instance represented by this selection

This method delivers valid results only if is_cell_inst? is true. It returns the instance reference (an Instance object) that this selection represents. This method has been added in version 0.16.

[const] bool is_cell_inst?

Description: True, if this selection represents a cell instance

If this attribute is true, the shape reference and layer are not valid.

[const] unsigned int layer

Description: Accessor to the layer index that describes which layer the selected shape is on

This method delivers valid results only for object selections that represent shapes, i.e for which is_cell_inst? is false.

[const] unsigned int path_length

Description: Returns the length of the path (number of elements delivered by each_inst)

This method has been added in version 0.16.

[const] const ref InstElement path_nth( unsigned int n )

Description: Returns the nth element of the path (similar to each_inst but with direct access through the index)

This method has been added in version 0.16.

n:The index of the element to retrieve (0..path_length-1)

[const] unsigned long seq

Description: The sequence number

The sequence number describes when the item was selected. A sequence number of 0 indicates that the item was selected in the first selection action (without 'Shift' pressed).

[const] const ref Shape shape

Description: Accessor to the shape object that describes the selected shape geometrically

This method delivers valid results only for object selections that represent shapes, i.e for which is_cell_inst? is false.

[const] unsigned int source

Description: Returns to the cell index of the cell that the selected element resides inside.

If this reference represents a cell instance, this method delivers the index of the cell in which the cell instance resides. Otherwise, this method returns the same value than cell_index. This method has been added in version 0.16.

[const] CplxTrans source_trans

Description: Accessor to the transformation applicable for an instance and shape.

If this object represents a shape, this transformation describes how the selected shape is transformed into the current cell of the cell view. If this object represents an instance, this transformation describes how the selected instance is transformed into the current cell of the cell view. This method is similar to trans, except that the resulting transformation does not include the instance transformation if the object represents an instance. This method has been added in version 0.16.

[const] CplxTrans trans

Description: Accessor to the transformation applicable for the shape.

If this object represents a shape, this transformation describes how the selected shape is transformed into the current cell of the cell view. Basically, this transformation is the accumulated transformation over the instantiation path. If the ObjectInstPath represents a cell instance, this includes the transformation of the selected instance as well.