API reference - Class ReportDatabaseNotation used in Ruby API documentation Description: The report database object
A report database is organised around a set of items which are associated with cells and categories. Categories can be organised hierarchically by created sub-categories of other categories. Cells are associated with layout database cells and can come with a example instantiation if the layout database does not allow a unique association of the cells. Items in the database can have a variety of attributes: values, tags and an image object. Values are geometrical objects for example. Tags are a set of boolean flags and an image can be attached to an item to provide a screenshot for visualisation for example. This is the main report database object. The basic use case of this object is to create one inside a LayoutView and populate it with items, cell and categories or load it from a file. Another use case is to create a standalone ReportDatabase object and use the methods provided to perform queries or to populate it. Public constructors
Public methods
Deprecated methods (protected, public, static, non-static and constructors)
Detailed descriptionvoid _createDescription: 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 _destroyDescription: 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 _manageDescription: 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 _unmanageDescription: 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. [const] const RdbCategory ptr category_by_id(unsigned long id)Description: Gets a category by ID
[const] const RdbCategory ptr category_by_path(string path)Description: Gets a category by path
[const] const RdbCell ptr cell_by_id(unsigned long id)Description: Returns the cell for a given ID
[const] const RdbCell ptr cell_by_qname(string qname)Description: Returns the cell for a given qualified name
void createDescription: Ensures the C++ object is created Use of this method is deprecated. Use _create instead RdbCategory ptr create_category(string name)Description: Creates a new top level category
RdbCategory ptr create_category(RdbCategory ptr parent,string name)Description: Creates a new sub-category
RdbCell ptr create_cell(string name)Description: Creates a new cell
RdbCell ptr create_cell(string name,string variant)Description: Creates a new cell, potentially as a variant for a cell with the same name
RdbItem ptr create_item(unsigned long cell_id,unsigned long category_id)Description: Creates a new item for the given cell/category combination
void create_items(unsigned long cell_id,unsigned long category_id,const CplxTrans trans,const Region polygons)Description: Creates new polygon items for the given cell/category combination
For each polygon in the region a single item will be created. The value of the item will be this polygon. A transformation can be supplied which can be used for example to convert the object's dimensions to micron units by scaling by the database unit. This method has been introduced in version 0.23. void create_items(unsigned long cell_id,unsigned long category_id,const CplxTrans trans,const Edges edges)Description: Creates new edge items for the given cell/category combination
For each edge a single item will be created. The value of the item will be this edge. A transformation can be supplied which can be used for example to convert the object's dimensions to micron units by scaling by the database unit. This method has been introduced in version 0.23. void create_items(unsigned long cell_id,unsigned long category_id,const CplxTrans trans,const EdgePairs edge_pairs)Description: Creates new edge pair items for the given cell/category combination
For each edge pair a single item will be created. The value of the item will be this edge pair. A transformation can be supplied which can be used for example to convert the object's dimensions to micron units by scaling by the database unit. This method has been introduced in version 0.23. void create_items(unsigned long cell_id,unsigned long category_id,const CplxTrans trans,Polygon[] polygons)Description: Creates new polygon items for the given cell/category combination
For each polygon a single item will be created. The value of the item will be this polygon. A transformation can be supplied which can be used for example to convert the object's dimensions to micron units by scaling by the database unit. This method has been introduced in version 0.23. void create_items(unsigned long cell_id,unsigned long category_id,const CplxTrans trans,Edge[] edges)Description: Creates new edge items for the given cell/category combination
For each edge a single item will be created. The value of the item will be this edge. A transformation can be supplied which can be used for example to convert the object's dimensions to micron units by scaling by the database unit. This method has been introduced in version 0.23. void create_items(unsigned long cell_id,unsigned long category_id,const CplxTrans trans,EdgePair[] edge_pairs)Description: Creates new edge pair items for the given cell/category combination
For each edge pair a single item will be created. The value of the item will be this edge pair. A transformation can be supplied which can be used for example to convert the object's dimensions to micron units by scaling by the database unit. This method has been introduced in version 0.23. [const] string descriptionDescription: Gets the databases description
The description is a general purpose string that is supposed to further describe the database and it's content in a human-readable form. Python specific notes:The object exposes a readable attribute 'description'. This is the getter. void description=(string desc)Description: Sets the databases description
Python specific notes:The object exposes a writable attribute 'description'. This is the setter. void destroyDescription: 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,iter] RdbCategory each_categoryDescription: Iterates over all top-level categories [const,iter] RdbCell each_cellDescription: Iterates over all cells [const,iter] RdbItem each_itemDescription: Iterates over all iterms inside the database [const,iter] RdbItem each_item_per_category(unsigned long category_id)Description: Iterates over all iterms inside the database which are associated with the given category
[const,iter] RdbItem each_item_per_cell(unsigned long cell_id)Description: Iterates over all iterms inside the database which are associated with the given cell
[const,iter] RdbItem each_item_per_cell_and_category(unsigned long cell_id,unsigned long category_id)Description: Iterates over all iterms inside the database which are associated with the given cell and category
[const] string filenameDescription: Gets the file name and path where the report database is stored
This property is set when a database is saved or loaded. It cannot be set manually. [const] string generatorDescription: Gets the databases generator
The generator string describes how the database was created, i.e. DRC tool name and tool options. In a later version this should allow to rerun the tool that created the report. Python specific notes:The object exposes a readable attribute 'generator'. This is the getter. void generator=(string generator)Description: Sets the generator string
Python specific notes:The object exposes a writable attribute 'generator'. This is the setter. [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_modified?Description: Returns a value indicating whether the database has been modified void load(string filename)Description: Loads the database from the given file
The reader recognizes the format automatically and will choose the appropriate decoder. 'gzip' compressed files are uncompressed automatically. [const] string nameDescription: Gets the database name
The name of the database is supposed to identify the database within a layout view context. The name is modified to be unique when a database is entered into a layout view. [static] new ReportDatabase ptr new(string name)Description: Create a report database
The name of the database will be used in the user interface to refer to a certain database. Python specific notes:This method is the default initializer of the object [const] unsigned long num_itemsDescription: Returns the number of items inside the database
[const] unsigned long num_items(unsigned long cell_id,unsigned long category_id)Description: Returns the number of items inside the database for a given cell/category combination
[const] unsigned long num_items_visitedDescription: Returns the number of items already visited inside the database
[const] unsigned long num_items_visited(unsigned long cell_id,unsigned long category_id)Description: Returns the number of items visited already for a given cell/category combination
[const] string original_fileDescription: Gets the original file name and path
The original file name is supposed to describe the file from which this report database was generated. Python specific notes:The object exposes a readable attribute 'original_file'. This is the getter. void original_file=(string path)Description: Sets the original file name and path
Python specific notes:The object exposes a writable attribute 'original_file'. This is the setter. void reset_modifiedDescription: Reset the modified flag void save(string filename)Description: Saves the database to the given file
The database is always saved in KLayout's XML-based format. void set_item_visited(const RdbItem ptr item,bool visited)Description: Modifies the visited state of an item
void set_tag_description(unsigned long tag_id,string description)Description: Sets the tag description for the given tag ID
See tag_id for a details about tags. [const] string tag_description(unsigned long tag_id)Description: Gets the tag description for the given tag ID
See tag_id for a details about tags. [const] unsigned long tag_id(string name)Description: Gets the tag ID for a given tag name
Tags are used to tag items in the database and to specify tagged (named) values. This method will always succeed and the tag will be created if it does not exist yet. Tags are basically names. There are user tags (for free assignment) and system tags which are used within the system. Both are separated to avoid name clashes. tag_id handles system tags while user_tag_id handles user tags. [const] string top_cell_nameDescription: Gets the top cell name
The top cell name identifies the top cell of the design for which the report was generated. This property must be set to establish a proper hierarchical context for a hierarchical report database. Python specific notes:The object exposes a readable attribute 'top_cell_name'. This is the getter. void top_cell_name=(string cell_name)Description: Sets the top cell name string
Python specific notes:The object exposes a writable attribute 'top_cell_name'. This is the setter. [const] unsigned long user_tag_id(string name)Description: Gets the tag ID for a given user tag name
This method will always succeed and the tag will be created if it does not exist yet. See tag_id for a details about tags. This method has been added in version 0.24. unsigned long[] variants(string name)Description: Gets the variants for a given cell name
|