KLayout Manual: Main Index » Class Index » API reference - Class InstanceAPI reference - Class InstanceNotation used in Ruby API documentation Description: An instance proxy An instance proxy is basically a pointer to an instance of different kinds, similar to Shape, the shape proxy. Instance objects can be duplicated without creating copies of the instances itself: the copy will still point to the same instance than the original. Public constructors
Public methods
Detailed description[const] bool !=(const Instance b)Description: Inequality of two Instance objects Warning: this operator returns true if both objects refer to the same instance, not just identical ones. [const] bool <(const Instance b)Description: Provide an order criterion for two Instance objects Warning: this operator is just provided to establish any order, not a particular one. [const] bool ==(const Instance b)Description: Equality of two Instance objects See the hint on the < operator. [const] Point aDescription: Return the displacement vector for the 'a' axis [const] void assign(const Instance 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] Point bDescription: Return the displacement vector for the 'b' axis Cell ptr cellDescription: Gets the cell this instance is contained in This method has been introduced in version 0.22. [const] unsigned int cell_indexDescription: Get the index of the cell this instance refers to [const] CellInstArray cell_instDescription: Get the basic CellInstArray object associated with this instance reference. void cell_inst=(const CellInstArray inst)Description: Changes the CellInstArray object to the given one. This method replaces the instance by the given CellInstArray object. This method has been introduced in version 0.22 [const] CplxTrans cplx_transDescription: Get the complex transformation of the instance or the first instance in the array This method is always valid compared to trans, since simple transformations can be expressed as complex transformations as well. void 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 delete_property(variant key)Description: Deletes the user property with the given key This method is a convenience method that deletes the property with the given key. It does nothing if no property with that key exists. Using that method is more convenient than creating a new property set with a new ID and assigning that properties ID. This method may change the properties ID. Calling this method will invalidate any iterators. It should not be called inside a loop iterating over shapes. This method has been introduced in version 0.22. void destroyDescription: 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] Instance dupDescription: Creates a copy of self [const] bool has_prop_id?Description: Check, if the instance is associated with a properties Id [const] bool is_complex?Description: Test, if the array is a complex array Returns true if the array represents complex instances (that is, with magnification and arbitrary rotation angles). [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_null?Description: Check, if the instance is a valid one [const] bool is_regular_array?Description: Test, if this instance is a regular array Layout ptr layoutDescription: Gets the layout this instance is contained in This method has been introduced in version 0.22. [const] unsigned long naDescription: Return the number of instances in the 'a' axis [const] unsigned long nbDescription: Return the number of instances in the 'b' axis [static] Instance newDescription: Creates a new object of this class [const] unsigned int parent_cell_indexDescription: Retrieve the reference to the parent cell [const] unsigned int prop_idDescription: Get the properties Id associated with the instance void prop_id=(unsigned int id)Description: Sets the properties Id associated with the instance This method has been introduced in version 0.22. variant property(variant key)Description: Gets the user property with the given key This method is a convenience method that gets the property with the given key. If no property with that key does not exist, it will return nil. Using that method is more convenient than using the layout object and the properties ID to retrieve the property value. This method has been introduced in version 0.22. void set_property(variant key,variant value)Description: Set the user property with the given key to the given value This method is a convenience method that sets the property with the given key to the given value. If no property with that key exists, it will create one. Using that method is more convenient than creating a new property set with a new ID and assigning that properties ID. This method may change the properties ID. Calling this method will invalidate any iterators. It should not be called inside a loop iterating over shapes. This method has been introduced in version 0.22. [const] unsigned int sizeDescription: The number of single instances in the instance array If the instance represents a single instance, the count is 1. Otherwise it is na*nb. [const] string to_sDescription: Create a string showing the contents of the reference This method has been introduced with version 0.16. [const] Trans transDescription: Get the transformation of the first instance in the array The transformation returned is only valid if the array does not represent a complex transformation array |