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

new CellView ptrnewCreates a new object of this class

Public methods

[const]bool==(const CellView other)Equality: compares the cell the view points to, not the path
void_createEnsures the C++ object is created
void_destroyExplicitly destroys the object
[const]bool_destroyed?Returns a value indicating whether the object was already destroyed
[const]bool_is_const_object?Returns a value indicating whether the reference is a const reference
void_manageMarks the object as managed by the script side.
void_unmanageMarks the object as no longer owned by the script side.
voidassign(const CellView other)Assigns 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
[const]Cell ptrctx_cellGet the reference to the context cell currently addressed
[const]unsigned intctx_cell_indexGet the context cell's index
[const]new CellView ptrdupCreates a copy of self
[const]stringfilenameGet filename associated with the layout behind the cellview
[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

Deprecated methods (protected, public, static, non-static and constructors)

voidcreateUse of this method is deprecated. Use _create instead
voiddestroyUse of this method is deprecated. Use _destroy instead
[const]booldestroyed?Use of this method is deprecated. Use _destroyed? instead
[const]boolis_const_object?Use of this method is deprecated. Use _is_const_object? instead

Detailed description

[const] bool ==(const CellView other)

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

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.

void _destroy

Description: Explicitly destroys the object

Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, 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] 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.

void _manage

Description: Marks the object as managed by the script side.

After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required.

Usually it's not required to call this method. It has been introduced in version 0.24.

void _unmanage

Description: Marks the object as no longer owned by the script side.

Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur.

Usually it's not required to call this method. It has been introduced in version 0.24.

[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.

void assign(const CellView other)

Description: Assigns another object to self

[const] Cell ptr cell

Description: Get the reference to the target cell currently addressed

Python specific notes:

The object exposes a readable attribute 'cell'. This is the getter.

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.

Python specific notes:

The object exposes a writable attribute 'cell'. This is the setter.

[const] unsigned int cell_index

Description: Get the target cell's index

Python specific notes:

The object exposes a readable attribute 'cell_index'. This is the getter.

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.

Python specific notes:

The object exposes a writable attribute 'cell_index'. This is the setter.

[const] string cell_name

Description: Get the name of the target cell currently addressed

Python specific notes:

The object exposes a readable attribute 'cell_name'. This is the getter.

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.

Python specific notes:

The object exposes a writable attribute 'cell_name'. This is the setter.

[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.

Python specific notes:

The object exposes a readable attribute 'context_path'. This is the getter.

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.

Python specific notes:

The object exposes a writable attribute 'context_path'. This is the setter.

void create

Description: Ensures the C++ object is created

Use of this method is deprecated. Use _create instead

[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 destroys the object

Use of this method is deprecated. Use _destroy instead

[const] bool destroyed?

Description: Returns a value indicating whether the object was already destroyed

Use of this method is deprecated. Use _destroyed? instead

[const] new CellView ptr 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

Use of this method is deprecated. Use _is_const_object? instead

[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] new CellView ptr new

Description: Creates a new object of this class

Python specific notes:

This method is the default initializer of the object

[const] unsigned int[] path

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

Python specific notes:

The object exposes a readable attribute 'path'. This is the getter.

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.

Python specific notes:

The object exposes a writable attribute 'path'. This is the setter.

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.

Python specific notes:

The object exposes a writable attribute 'cell_index'. This is the setter.

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.

Python specific notes:

The object exposes a writable attribute 'cell_name'. This is the setter.

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.

Python specific notes:

The object exposes a writable attribute 'context_path'. This is the setter.

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.

Python specific notes:

The object exposes a writable attribute 'path'. This is the setter.

[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.

Python specific notes:

The object exposes a readable attribute 'technology'. This is the getter.

[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.

Python specific notes:

The object exposes a writable attribute 'technology'. This is the setter.