API reference - Class CellView

Notation used in Ruby API documentation

Description: A class describing what is shown inside a layout view

The cell view points to a specific cell within a certain layout and a hierarchical context. For that, first of all a layout pointer is provided. The cell itself is addressed by an cell_index or a cell object reference. The layout pointer can be nil, indicating that the cell view is invalid.

The cell is not only identified by it's index or object but also by the path leading to that cell. This path indicates how to find the cell in the hierarchical context of it's parent cells.

The path is in fact composed of two parts: first in an unspecific fashion, just describing which parent cells are used. The target of this path is called the "context cell". It is accessible by the ctx_cell_index or ctx_cell methods. In the viewer, the unspecific part of the path is the location of the cell in the cell tree.

Additionally the path's second part may further identify a specific instance of a certain subcell in the context cell. This is done through a set of InstElement objects. The target of this specific path is the actual cell addressed by the cellview. This target cell is accessible by the cell_index or cell methods. In the viewer, the target cell is shown in the context of the context cell. The hierarchy levels are counted from the context cell, which is on level 0. If the context path is empty, the context cell is identical with the target cell.

See The Application API for more details about the application objects.

Public constructors

CellViewnewCreates a new object of this class

Public methods

[const]bool==(const CellView other)Equality: compares the cell the view points to, not the path
[const]voidassign(const CellView other)Assign the contents of another object to self
[const]Cell ptrcellGet the reference to the target cell currently addressed
voidcell=(Cell ptr cell)Set the cell by reference to a Cell object
[const]unsigned intcell_indexGet the target cell's index
voidcell_index=(unsigned int cell_index)Set the path to the given cell
[const]stringcell_nameGet the name of the target cell currently addressed
voidcell_name=(string cell_name)Set the cell by name
[const]InstElement[]context_pathGet the cell's context path
voidcontext_path=(InstElement[] path)Set the context path explicitly
voidcreateEnsures the C++ object is created
[const]Cell ptrctx_cellGet the reference to the context cell currently addressed
[const]unsigned intctx_cell_indexGet the context cell's index
voiddestroyExplicitly destroy the object
[const]booldestroyed?Returns a value indicating whether the object was already destroyed
[const]CellViewdupCreates a copy of self
[const]stringfilenameGet filename associated with the layout behind the cellview
[const]boolis_const_object?Returns a value indicating whether the reference is a const reference
[const]boolis_valid?Test if the view points to a valid cell
[const]LayoutlayoutGet the reference to the layout object addressed by this view
[const]stringnameGet the unique name associated with the layout behind the cellview
[const]unsigned int[]pathGet the cell's unspecific part of the path leading to the context cell
voidpath=(unsigned int[] path)Set the unspecific part of the path explicitly
voidreset_cellReset the cell
voidset_cell(unsigned int cell_index)Set the path to the given cell
voidset_cell_name(string cell_name)Set the cell by name
voidset_context_path(InstElement[] path)Set the context path explicitly
voidset_path(unsigned int[] path)Set the unspecific part of the path explicitly
[const]stringtechnologyReturns the technology name for the layout behind the given cell view
[const]voidtechnology=(string tech_name)Sets the technology for the layout behind the given cell view

Public static methods and constants

const CellView ptractiveGets the active CellView

Detailed description

[const] bool ==(const CellView other)

Description: Equality: compares the cell the view points to, not the path

[static] const CellView ptr active

Description: Gets the active CellView

The active CellView is the one that is selected in the current layout view. This method is equivalent to

RBA::Application::instance.main_window.current_view.active_cellview
If no CellView is active, this method returns nil.

This method has been introduced in version 0.23.

[const] void assign(const CellView 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] Cell ptr cell

Description: Get the reference to the target cell currently addressed

void cell=(Cell ptr cell)

Description: Set the cell by reference to a Cell object

Setting the cell reference to nil invalidates the cellview. This method will construct any path to this cell, not a particular one. It will clear the context path and update the context and target cell.

[const] unsigned int cell_index

Description: Get the target cell's index

void cell_index=(unsigned int cell_index)

Description: Set the path to the given cell

This method will construct any path to this cell, not a particular one. It will clear the context path and update the context and target cell. Note that the cell is specified by it's index.

[const] string cell_name

Description: Get the name of the target cell currently addressed

void cell_name=(string cell_name)

Description: Set the cell by name

If the name is not a valid one, the cellview will become invalid. This method will construct any path to this cell, not a particular one. It will clear the context path and update the context and target cell.

[const] InstElement[] context_path

Description: Get the cell's context path

The context path leads from the context cell to the target cell in a specific fashion, i.e. describing each instance in detail, not just be cell indices. If the context and target cell are identical, the context path is empty.

void context_path=(InstElement[] path)

Description: Set the context path explicitly

This method assumes that the unspecific part of the path is established already and that the context path starts from the context cell.

void create

Description: 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.

[const] Cell ptr ctx_cell

Description: Get the reference to the context cell currently addressed

[const] unsigned int ctx_cell_index

Description: Get the context cell's index

void 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: 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] CellView dup

Description: Creates a copy of self

[const] string filename

Description: Get filename associated with the layout behind the cellview

[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] bool is_valid?

Description: Test if the view points to a valid cell

[const] Layout layout

Description: Get the reference to the layout object addressed by this view

[const] string name

Description: Get the unique name associated with the layout behind the cellview

[static] CellView new

Description: Creates a new object of this class

[const] unsigned int[] path

Description: Get the cell's unspecific part of the path leading to the context cell

void path=(unsigned int[] path)

Description: Set the unspecific part of the path explicitly

Setting the unspecific part of the path will clear the context path component and update the context and target cell.

void reset_cell

Description: Reset the cell

The cellview will become invalid. The layout object will still be attached to the cellview.

void set_cell(unsigned int cell_index)

Description: Set the path to the given cell

This method will construct any path to this cell, not a particular one. It will clear the context path and update the context and target cell. Note that the cell is specified by it's index.

void set_cell_name(string cell_name)

Description: Set the cell by name

If the name is not a valid one, the cellview will become invalid. This method will construct any path to this cell, not a particular one. It will clear the context path and update the context and target cell.

void set_context_path(InstElement[] path)

Description: Set the context path explicitly

This method assumes that the unspecific part of the path is established already and that the context path starts from the context cell.

void set_path(unsigned int[] path)

Description: Set the unspecific part of the path explicitly

Setting the unspecific part of the path will clear the context path component and update the context and target cell.

[const] string technology

Description: Returns the technology name for the layout behind the given cell view

This method has been added in version 0.23.

[const] void technology=(string tech_name)

Description: Sets the technology for the layout behind the given cell view

According to the specification of the technology, new layer properties may be loaded or the net tracer may be reconfigured. If the layout is shown in multiple views, the technology is updated for all views. This method has been added in version 0.22.