Class CellView (version 0.18)

Description: A "cell view" reference

A cell view reference points to a certain cell within a certain layout. The layout pointer can be nil, indicating that it is invalid. Also, the cell view describes a cell within that layout. The cell is addressed by an cell_index or a cell object reference.

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

The path is in fact composed in two ways: once 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.

Additionally the path may further identify a certain instance of a certain subcell in the context cell. This is done through a set of InstElement objects. The target of this context 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.

Class overview

Index

Method Overview

[const] bool ==( CellView other )Equality: compares the cell the view points to, not the path
[const] bool is_valid?Test if the view points to a valid cell
set_path( unsigned int path[ ] )Set the unspecific part of the path explicitly
set_context_path( InstElement path[ ] )Set the context path explicitly
set_cell( unsigned int )Set the path to the given cell
set_cell_name( string )Set the cell by name
reset_cellReset the cell
[const] unsigned int ctx_cell_indexGet the context cell's index
[const] ref Cell ctx_cellGet the reference to the context cell currently addressed
[const] unsigned int cell_indexGet the target cell's index
[const] ref Cell cellGet the reference to the target cell currently addressed
[const] string filenameGet filename associated with the layout behind the cellview
[const] string nameGet 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
[const] InstElement[ ] context_pathGet the cell's context path
[const] ref Layout layoutGet the reference to the layout object addressed by this view
assign( CellView other )Assign the contents of another object to self
[const] CellView dupCreates a copy of self.
destroyExplicitly destroy the object
[const] bool destroyedTell, if the object was destroyed

[const] bool ==( CellView other )

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

assign( 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] ref Cell cell

Description: Get the reference to the target cell currently addressed

[const] unsigned int cell_index

Description: Get the target cell's index

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

[const] ref Cell 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

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

Description: Creates a copy of self.

[const] string filename

Description: Get filename associated with the layout behind the cellview

[const] bool is_valid?

Description: Test if the view points to a valid cell

[const] ref 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

[const] unsigned int[ ] path

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

reset_cell

Description: Reset the cell

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

set_cell( unsigned int )

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.

set_cell_name( string )

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.

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.

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.