Class Instance (version 0.18)

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.

Class overview

Index

Method Overview

[const] unsigned int prop_idGet the properties Id associated with the instance
[const] bool has_prop_id?Check, if the instance is associated with a properties Id
[const] bool is_null?Check, if the instance is a valid one
[const] unsigned int parent_cell_indexRetrieve the reference to the parent cell
[const] unsigned int cell_indexGet the index of the cell this instance refers to
[const] bool is_regular_array?Test, if this instance is a regular array
[const] Point aReturn the displacement vector for the 'a' axis
[const] Point bReturn the displacement vector for the 'b' axis
[const] unsigned long naReturn the number of instances in the 'a' axis
[const] unsigned long nbReturn the number of instances in the 'b' axis
[const] CplxTrans cplx_transGet the complex transformation of the instance or the first instance in the array
[const] const ref Trans transGet the transformation of the first instance in the array
[const] unsigned int sizeThe number of single instances in the instance array
[const] bool is_complex?Test, if the array is a complex array
[const] const ref CellInstArray cell_instGet the basic CellInstArray object associated with this instance reference.
[const] bool <( Instance b )Provide an order criterion for two Instance objects
[const] bool !=( Instance b )Inequality of two Instance objects
[const] bool ==( Instance b )Equality of two Instance objects
[const] string to_sCreate a string showing the contents of the reference
assign( Instance other )Assign the contents of another object to self
[const] Instance dupCreates a copy of self.
destroyExplicitly destroy the object
[const] bool destroyedTell, if the object was destroyed

[const] bool !=( 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 <( 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 ==( Instance b )

Description: Equality of two Instance objects

See the hint on the < operator.

[const] Point a

Description: Return the displacement vector for the 'a' axis

assign( 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 b

Description: Return the displacement vector for the 'b' axis

[const] unsigned int cell_index

Description: Get the index of the cell this instance refers to

[const] const ref CellInstArray cell_inst

Description: Get the basic CellInstArray object associated with this instance reference.

[const] CplxTrans cplx_trans

Description: 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.

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

Description: 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_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] unsigned long na

Description: Return the number of instances in the 'a' axis

[const] unsigned long nb

Description: Return the number of instances in the 'b' axis

[const] unsigned int parent_cell_index

Description: Retrieve the reference to the parent cell

[const] unsigned int prop_id

Description: Get the properties Id associated with the instance

[const] unsigned int size

Description: 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_s

Description: Create a string showing the contents of the reference

This method has been introduced with version 0.16.

[const] const ref Trans trans

Description: 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