Notation used in Ruby API documentation
Module: db
Description: Represents a technology
This class represents one technology from a set of technologies. The set of technologies available in the system can be obtained with technology_names. Individual technology definitions are returned with technology_by_name. Use create_technology to register new technologies and remove_technology to delete technologies.
Note that a Technology object needs to be registered in the system, before its name can be used to specify a technology, for example in Layout#technology_name. Technology objects created by create_technology are automatically registered. If you create a Technology object directly, you need to register it explicitly:
tech = RBA::Technology::new tech.load("mytech.lyt") RBA::Technology::register_technology(tech)
Note that in the latter example, an exception will be thrown if a technology with the same name already exists. Also note, that Technology#register will register a copy of the object, so modifying it after registration will not have any effect.
The Technology class has been introduced in version 0.25.
new Technology ptr | new | Creates a new object of this class |
[const] | Technology ptr | _const_cast | Returns a non-const reference to self. | |
void | _create | Ensures the C++ object is created | ||
void | _destroy | Explicitly 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 | _manage | Marks the object as managed by the script side. | ||
void | _unmanage | Marks the object as no longer owned by the script side. | ||
void | add_other_layers= | (bool add) | Sets the flag indicating whether to add other layers to the layer properties | |
[const] | bool | add_other_layers? | Gets the flag indicating whether to add other layers to the layer properties | |
void | assign | (const Technology other) | Assigns another object to self | |
[const] | string | base_path | Gets the base path of the technology | |
TechnologyComponent ptr | component | (string name) | Gets the technology component with the given name | |
[const] | string[] | component_names | Gets the names of all components available for component | |
[const] | string | correct_path | (string path) | Makes a file path relative to the base path if one is specified |
[const] | double | dbu | Gets the default database unit | |
void | dbu= | (double dbu) | Sets the default database unit | |
[const] | string | default_base_path | Gets the default base path | |
[const] | double | default_grid | Gets the default grid | |
[const] | double[] | default_grids | Gets the default grids | |
void | default_grids= | (double[] grids) | Sets the default grids | |
[const] | string | description | Gets the description | |
void | description= | (string description) | Sets the description | |
[const] | new Technology ptr | dup | Creates a copy of self | |
[const] | string | eff_layer_properties_file | Gets the effective path of the layer properties file | |
[const] | string | eff_path | (string path) | Makes a file path relative to the base path if one is specified |
[const] | string | explicit_base_path | Gets the explicit base path | |
void | explicit_base_path= | (string path) | Sets the explicit base path | |
[const] | string | group | Gets the technology group | |
void | group= | (string group) | Sets the technology group | |
[const] | string | layer_properties_file | Gets the path of the layer properties file | |
void | layer_properties_file= | (string file) | Sets the path of the layer properties file | |
void | load | (string file) | Loads the technology definition from a file | |
[const] | LoadLayoutOptions | load_layout_options | Gets the layout reader options | |
void | load_layout_options= | (const LoadLayoutOptions options) | Sets the layout reader options | |
[const] | string | name | Gets the name of the technology | |
void | name= | (string name) | Sets the name of the technology | |
[const] | void | save | (string file) | Saves the technology definition to a file |
[const] | SaveLayoutOptions | save_layout_options | Gets the layout writer options | |
void | save_layout_options= | (const SaveLayoutOptions options) | Sets the layout writer options | |
void | set_default_grids | (double[] grids, double default_grid = 0) | Sets the default grids and the strong default one | |
[const] | string | to_xml | Returns a XML representation of this technolog |
void | clear_technologies | Clears all technologies | ||
Technology ptr | create_technology | (string name) | Creates a new (empty) technology with the given name | |
bool | has_technology? | (string name) | Returns a value indicating whether there is a technology with this name | |
Technology ptr | register_technology | (const Technology tech) | Registers a technology in the system | |
void | remove_technology | (string name) | Removes the technology with the given name from the system | |
void | technologies_from_xml | (string xml) | Loads the technologies from a XML representation | |
string | technologies_to_xml | Returns a XML representation of all technologies registered in the system | ||
Technology ptr | technology_by_name | (string name) | Gets the technology object for a given name | |
Technology | technology_from_xml | (string xml) | Loads the technology from a XML representation | |
string[] | technology_names | Gets a list of technology names defined in the system |
void | create | Use of this method is deprecated. Use _create instead | ||
void | destroy | Use of this method is deprecated. Use _destroy instead | ||
[const] | bool | destroyed? | Use of this method is deprecated. Use _destroyed? instead | |
[const] | bool | is_const_object? | Use of this method is deprecated. Use _is_const_object? instead |
_const_cast | Signature: [const] Technology ptr _const_cast Description: Returns a non-const reference to self. Basically, this method allows turning a const object reference to a non-const one. This method is provided as last resort to remove the constness from an object. Usually there is a good reason for a const object reference, so using this method may have undesired side effects. This method has been introduced in version 0.29.6. |
_create | Signature: 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. |
_destroy | Signature: 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. |
_destroyed? | Signature: [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. |
_is_const_object? | Signature: [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. |
_manage | Signature: 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. |
_unmanage | Signature: 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. |
add_other_layers= | Signature: void add_other_layers= (bool add) Description: Sets the flag indicating whether to add other layers to the layer properties Python specific notes: |
add_other_layers? | Signature: [const] bool add_other_layers? Description: Gets the flag indicating whether to add other layers to the layer properties Python specific notes: |
assign | Signature: void assign (const Technology other) Description: Assigns another object to self |
base_path | Signature: [const] string base_path Description: Gets the base path of the technology The base path is the effective path where files are read from if their file path is a relative one. If the explicit path is set (see explicit_base_path=), it is used. If not, the default path is used. The default path is the one from which a technology file was imported. The explicit one is the one that is specified explicitly with explicit_base_path=. |
clear_technologies | Signature: [static] void clear_technologies Description: Clears all technologies This method has been introduced in version 0.26. |
component | Signature: TechnologyComponent ptr component (string name) Description: Gets the technology component with the given name The names are unique system identifiers. For all names, use component_names. |
component_names | Signature: [const] string[] component_names Description: Gets the names of all components available for component |
correct_path | Signature: [const] string correct_path (string path) Description: Makes a file path relative to the base path if one is specified This method turns an absolute path into one relative to the base path. Only files below the base path will be made relative. Files above or beside won't be made relative. See base_path for details about the default base path. |
create | Signature: void create Description: Ensures the C++ object is created Use of this method is deprecated. Use _create instead 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. |
create_technology | Signature: [static] Technology ptr create_technology (string name) Description: Creates a new (empty) technology with the given name The new technology is already registered in the system. This method returns a reference to the new technology. |
dbu | Signature: [const] double dbu Description: Gets the default database unit The default database unit is the one used when creating a layout for example. Python specific notes: |
dbu= | Signature: void dbu= (double dbu) Description: Sets the default database unit Python specific notes: |
default_base_path | Signature: [const] string default_base_path Description: Gets the default base path See base_path for details about the default base path. Python specific notes: |
default_grid | Signature: [const] double default_grid Description: Gets the default grid The default grid is a specific one from the default grid list. It indicates the one that is taken if the current grid is not matching one of the default grids. To set the default grid, use set_default_grids. This property has been introduced in version 0.29. |
default_grids | Signature: [const] double[] default_grids Description: Gets the default grids See default_grids for details. This property has been introduced in version 0.28.17. Python specific notes: |
default_grids= | Signature: void default_grids= (double[] grids) Description: Sets the default grids If not empty, this list replaces the global grid list for this technology. Note that this method will reset the default grid (see default_grid). Use set_default_grids to set the default grids and the strong default one. This property has been introduced in version 0.28.17. Python specific notes: |
description | Signature: [const] string description Description: Gets the description The technology description is shown to the user in technology selection dialogs and for display purposes. Python specific notes: |
description= | Signature: void description= (string description) Description: Sets the description Python specific notes: |
destroy | Signature: void destroy Description: Explicitly destroys the object Use of this method is deprecated. Use _destroy instead 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. |
destroyed? | Signature: [const] bool destroyed? Description: Returns a value indicating whether the object was already destroyed Use of this method is deprecated. Use _destroyed? instead 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. |
dup | Signature: [const] new Technology ptr dup Description: Creates a copy of self Python specific notes: |
eff_layer_properties_file | Signature: [const] string eff_layer_properties_file Description: Gets the effective path of the layer properties file |
eff_path | Signature: [const] string eff_path (string path) Description: Makes a file path relative to the base path if one is specified This method will return the actual path for a file from the file's path. If the input path is a relative one, it will be made absolute by using the base path. See base_path for details about the default base path. |
explicit_base_path | Signature: [const] string explicit_base_path Description: Gets the explicit base path See base_path for details about the explicit base path. Python specific notes: |
explicit_base_path= | Signature: void explicit_base_path= (string path) Description: Sets the explicit base path See base_path for details about the explicit base path. Python specific notes: |
group | Signature: [const] string group Description: Gets the technology group The technology group is used to group certain technologies together in the technology selection menu. Technologies with the same group are put under a submenu with that group title. The 'group' attribute has been introduced in version 0.26.2. Python specific notes: |
group= | Signature: void group= (string group) Description: Sets the technology group See group for details about this attribute. The 'group' attribute has been introduced in version 0.26.2. Python specific notes: |
has_technology? | Signature: [static] bool has_technology? (string name) Description: Returns a value indicating whether there is a technology with this name |
is_const_object? | Signature: [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 This method returns true, if self is a const reference. In that case, only const methods may be called on self. |
layer_properties_file | Signature: [const] string layer_properties_file Description: Gets the path of the layer properties file If empty, no layer properties file is associated with the technology. If non-empty, this path will be corrected by the base path (see correct_path) and this layer properties file will be loaded for layouts with this technology. Python specific notes: |
layer_properties_file= | Signature: void layer_properties_file= (string file) Description: Sets the path of the layer properties file See layer_properties_file for details about this property. Python specific notes: |
load | Signature: void load (string file) Description: Loads the technology definition from a file |
load_layout_options | Signature: [const] LoadLayoutOptions load_layout_options Description: Gets the layout reader options This method returns the layout reader options that are used when reading layouts with this technology. Change the reader options by modifying the object and using the setter to change it: opt = tech.load_layout_options opt.dxf_dbu = 2.5 tech.load_layout_options = opt Python specific notes: |
load_layout_options= | Signature: void load_layout_options= (const LoadLayoutOptions options) Description: Sets the layout reader options See load_layout_options for a description of this property. Python specific notes: |
name | Signature: [const] string name Description: Gets the name of the technology Python specific notes: |
name= | Signature: void name= (string name) Description: Sets the name of the technology Python specific notes: |
new | Signature: [static] new Technology ptr new Description: Creates a new object of this class Python specific notes: |
register_technology | Signature: [static] Technology ptr register_technology (const Technology tech) Description: Registers a technology in the system Only after a technology is registered, it can be used in the system, e.g. by specifying its name in Layout#technology_name. While create_technology already registers the technology, this method allows registering a Technology object that has created in other ways. This method returns a reference to the new technology object, which is a copy of the argument. remove_technology can be used to remove a technology registered by this method. This method has been introduced in version 0.28.14. |
remove_technology | Signature: [static] void remove_technology (string name) Description: Removes the technology with the given name from the system |
save | Signature: [const] void save (string file) Description: Saves the technology definition to a file |
save_layout_options | Signature: [const] SaveLayoutOptions save_layout_options Description: Gets the layout writer options This method returns the layout writer options that are used when writing layouts with this technology. Change the reader options by modifying the object and using the setter to change it: opt = tech.save_layout_options opt.dbu = 0.01 tech.save_layout_options = opt Python specific notes: |
save_layout_options= | Signature: void save_layout_options= (const SaveLayoutOptions options) Description: Sets the layout writer options See save_layout_options for a description of this property. Python specific notes: |
set_default_grids | Signature: void set_default_grids (double[] grids, double default_grid = 0) Description: Sets the default grids and the strong default one See default_grids and default_grid for a description of this property. Note that the default grid has to be a member of the 'grids' array to become active. This method has been introduced in version 0.29. |
technologies_from_xml | Signature: [static] void technologies_from_xml (string xml) Description: Loads the technologies from a XML representation See technologies_to_xml for details. |
technologies_to_xml | Signature: [static] string technologies_to_xml Description: Returns a XML representation of all technologies registered in the system technologies_from_xml can be used to restore the technology definitions. This method is provided mainly as a substitute for the pre-0.25 way of accessing technology data through the 'technology-data' configuration parameter. This method will return the equivalent string. |
technology_by_name | Signature: [static] Technology ptr technology_by_name (string name) Description: Gets the technology object for a given name |
technology_from_xml | Signature: [static] Technology technology_from_xml (string xml) Description: Loads the technology from a XML representation See technology_to_xml for details. Note that this function will create a new Technology object which is not registered in the system. See Technology#register for details. |
technology_names | Signature: [static] string[] technology_names Description: Gets a list of technology names defined in the system |
to_xml | Signature: [const] string to_xml Description: Returns a XML representation of this technolog technology_from_xml can be used to restore the technology definition. |