Class LayerPropertiesIterator (version 0.18)

Description: Flat layer iterator

This iterator provides a flat view for the layers in the layer tree

Class overview

Index

Method Overview

[const] bool !=( LayerPropertiesIterator other )Inequality
[const] bool ==( LayerPropertiesIterator other )Equality
[const] bool <( LayerPropertiesIterator other )Comparison
[const] bool at_top?At-the-top property
[const] bool at_end?At-the-end property
[const] bool is_null?"is null" predicate
ref LayerPropertiesIterator nextIncrement operator
ref LayerPropertiesIterator upMove up
next_sibling( int n )Move to the next sibling by a given distance
to_sibling( unsigned int n )Move to the sibling with the given index
[const] unsigned int num_siblingsReturn the number of siblings
down_first_childMove to the first child
down_last_childMove to the last child
[const] const ref LayerPropertiesNode currentAccess to the current element
[const] LayerPropertiesIterator parentObtain the parent iterator
[const] LayerPropertiesIterator first_childObtain the iterator pointing to the first child
[const] LayerPropertiesIterator last_childObtain the iterator pointing to the last child
[const] unsigned int child_indexObtain the index of the child within the parent
assign( LayerPropertiesIterator other )Assign the contents of another object to self
[const] LayerPropertiesIterator dupCreates a copy of self.
destroyExplicitly destroy the object
[const] bool destroyedTell, if the object was destroyed

[const] bool !=( LayerPropertiesIterator other )

Description: Inequality

other:The other object to compare against

[const] bool <( LayerPropertiesIterator other )

Description: Comparison

other:The other object to compare against
returns:true, if self points to an object that comes before other

[const] bool ==( LayerPropertiesIterator other )

Description: Equality

other:The other object to compare against

assign( LayerPropertiesIterator 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] bool at_end?

Description: At-the-end property

This predicate is true if the iterator is at the end of either all elements or at the end of the child list (if down_last_child or down_first_child is used to iterate).

[const] bool at_top?

Description: At-the-top property

This predicate is true if there is no parent level.

[const] unsigned int child_index

Description: Obtain the index of the child within the parent

This method returns the index, that the element pointed to has in the list of children of it's parent. If the element does not have a parent, the index of the element in the global list is returned.

[const] const ref LayerPropertiesNode current

Description: Access to the current element

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.

down_first_child

Description: Move to the first child

This method moves to the first child of the current element. If there is no child, at_end? will be true. Even then, the iterator points to the child level and up can be used to move back.

down_last_child

Description: Move to the last child

This method moves to the last child of the current element. at_end? will be true then. Even then, the iterator points to the child level and up can be used to move back.

[const] LayerPropertiesIterator dup

Description: Creates a copy of self.

[const] LayerPropertiesIterator first_child

Description: Obtain the iterator pointing to the first child

If there is no children, the iterator will be a valid insert point but not point to any valid element. It will report at_end? = true.

[const] bool is_null?

Description: "is null" predicate

This predicate is true if the iterator is "null". Such an iterator can be created with the default constructor or by moving a top-level iterator up.

[const] LayerPropertiesIterator last_child

Description: Obtain the iterator pointing to the last child

The iterator will be a valid insert point but not point to any valid element. It will report at_end? = true.

ref LayerPropertiesIterator next

Description: Increment operator

The iterator will be incremented to point to the next layer entry. It will descend into the hierarchy to address children if there are any.

next_sibling( int n )

Description: Move to the next sibling by a given distance

The iterator is moved to the nth next sibling of the current element.

[const] unsigned int num_siblings

Description: Return the number of siblings

[const] LayerPropertiesIterator parent

Description: Obtain the parent iterator

This method will return an iterator pointing to the parent element. If there is no parent, the returned iterator will be 'null'.

to_sibling( unsigned int n )

Description: Move to the sibling with the given index

The iterator is moved to the nth sibling of the current element.

ref LayerPropertiesIterator up

Description: Move up

The iterator is moved to point to the current element's parent. If the current element does not have a parent, the iterator will be undefined.