API 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. When the Instance object is modified, the actual instance behind it is modified. The Instance object acts as a simplified interface for single and array instances with or without properties. See The Database API for more details about the database objects. 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 void a=(const Point a)Description: Sets the displacement vector for the 'a' axis If the instance was not an array instance before it is made one. This method has been introduced in version 0.23. [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 void b=(const Point b)Description: Sets the displacement vector for the 'b' axis If the instance was not an array instance before it is made one. This method has been introduced in version 0.23. [const] Box bboxDescription: The bounding box of the instance The bounding box incorporates all instances that the array represents. It gives the overall extension of the child cell as seen in the calling cell (or all array members if the instance forms an array). This method has been introduced in version 0.23. Cell ptr cellDescription: Get the Cell object of the cell this instance refers to Please note that before version 0.23 this method returned the cell the instance is contained in. For consistency, this method has been renamed parent_cell. This method has been introduced in version 0.23. void cell=(const Cell ptr cell)Description: Sets the Cell object this instance refers to Setting the cell object to nil is equivalent to deleting the instance. This method has been introduced in version 0.23. [const] unsigned int cell_indexDescription: Get the index of the cell this instance refers to void cell_index=(unsigned int cell_index)Description: Sets the index of the cell this instance refers to This method has been introduced in version 0.23. [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 cplx_trans=(const CplxTrans arg1)Description: Sets the complex transformation of the instance or the first instance in the array This method has been introduced in version 0.23. 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 deleteDescription: Delete this instance After this method was called, the instance object is pointing to nothing. This method has been introduced in version 0.23. 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 may invalidate any iterators. It should not be called inside a loop iterating over instances. 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 void explodeDescription: Explodes the instance array This method does nothing if the instance was not an array before. The instance object will point to the first instance of the array afterwards. This method has been introduced in version 0.23. [const] bool has_prop_id?Description: Returns true, if the instance has properties [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 [const] bool is_valid?Description: Test if the Instance object is still pointing to a valid instance If the instance represented by the given reference has been deleted, this method returns false. If however, another instance has been inserted already that occupies the original instances position, this method will return true again. This method has been introduced in version 0.23 and is a shortcut for "inst.cell.is_valid?(inst)". 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 void na=(unsigned long na)Description: Sets the number of instances in the 'a' axis If the instance was not an array instance before it is made one. This method has been introduced in version 0.23. [const] unsigned long nbDescription: Return the number of instances in the 'b' axis void nb=(unsigned long nb)Description: Sets the number of instances in the 'b' axis If the instance was not an array instance before it is made one. This method has been introduced in version 0.23. [static] Instance newDescription: Creates a new object of this class Cell ptr parent_cellDescription: Gets the cell this instance is contained in Returns nil if the instance does not live inside a cell. This method was named "cell" previously which lead to confusion with cell_index. It was renamed to "parent_cell" in version 0.23. void parent_cell=(Cell ptr arg1)Description: Moves the instance to a different cell Both the current and the target cell must live in the same layout. This method has been introduced in version 0.23. [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 is provided, if a properties ID has been derived already. Usually it's more convenient to use delete_property, set_property or property. 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 exists, 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 may invalidate any iterators. It should not be called inside a loop iterating over instances. 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] string to_s(bool with_cellname)Description: Create a string showing the contents of the reference Passing true to with_cellname makes the string contain the cellname instead of the cell index This method has been introduced with version 0.23. [const] Trans transDescription: Get the transformation of the instance or the first instance in the array The transformation returned is only valid if the array does not represent a complex transformation array void trans=(const Trans arg1)Description: Sets the transformation of the instance or the first instance in the array This method has been introduced in version 0.23. void transform(const Trans t)Description: Transforms the instance array with the given transformation See Cell#transform for a description of this method. This method has been introduced in version 0.23. void transform(const CplxTrans t)Description: Transforms the instance array with the given transformation See Cell#transform for a description of this method. This method has been introduced in version 0.23. void transform(const ICplxTrans t)Description: Transforms the instance array with the given transformation See Cell#transform for a description of this method. This method has been introduced in version 0.23. void transform_into(const Trans t)Description: Transforms the instance array with the given transformation See Cell#transform_into for a description of this method. This method has been introduced in version 0.23. void transform_into(const CplxTrans t)Description: Transforms the instance array with the given transformation See Cell#transform_into for a description of this method. This method has been introduced in version 0.23. void transform_into(const ICplxTrans t)Description: Transforms the instance array with the given transformation See Cell#transform_into for a description of this method. This method has been introduced in version 0.23. |