This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Implement concrete iterators as a type hierarchy for multiway trees


The iterators for the multiway trees are now implemented as a type
hierarchy. Iterating over a tree is the same as iterating over a subtree
starting from the root, and so the tree iterator forwards the request to the
subtree iterator.

Tested on x86_64-pc-linux-gnu, committed on trunk

2011-12-02  Matthew Heaney  <heaney@adacore.com>

	* a-cbmutr.ads (No_Node): Moved declaration from body to spec
	* a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Iterator): Derives
	from Root_Iterator.
	(Child_Iterator): Derives from Root_Iterator.
	(Finalize): Implemented as an override operation for Root_Iterator.
	(First): Return value depends on Subtree component.
	(Last): Component was renamed from Parent to Subtree.
	(Next): Checks parameter value, and uses simplified loop.
	(Iterate): Forwards to Iterate_Subtree.
	(Iterate_Children): Component was renamed from Parent to Subtree.
	(Iterate_Subtree): Checks parameter value

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]