rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlSafeListIteratorOf(NAME) Class Reference

A safe iterator of lists. More...

#include <ilog/list.h>

List of all members.

Public Member Functions

 IlSafeListIteratorOf(NAME) (const IlListOf(NAME) &list)
 Constructor.
IlBoolean hasMoreElements () const
 Indicates that the enumeration can carry on.
IlBoolean isListAlive () const
 Returns the status of the iterated list.
TYPE nextElement ()
 Returns the next element in the list.

Detailed Description

A safe iterator of lists.

Library: ilog

This class is generated by the macro IlDefineListOf(NAME, TYPE).
It is similar to (and derives from, in a hidden manner) IlListIteratorOf(NAME), but has the advantage of letting the user modify the list (even destroy it) while you are iterating its elements.

See also:
IlListOf(NAME).

Constructor & Destructor Documentation

IlSafeListIteratorOf(NAME)::IlSafeListIteratorOf(NAME) ( const IlListOf(NAME) list  ) 

Constructor.

Initializes a new iterator for the indicated list. The current position is set to the beginning of the list.

Parameters:
list A reference to the iterated list.

Member Function Documentation

IlBoolean IlSafeListIteratorOf(NAME)::hasMoreElements (  )  const

Indicates that the enumeration can carry on.

If this member function returns IlFalse, you must not call nextElement.

Returns:
IlTrue if the list is still valid, and there are more elements to iterate. It returns IlFalse if the list is invalid or if the iterator has reached the end of the list.
IlBoolean IlSafeListIteratorOf(NAME)::isListAlive (  )  const

Returns the status of the iterated list.

Returns:
IlTrue if the list was not destroyed during the iteration, and IlFalse if it was.
TYPE IlSafeListIteratorOf(NAME)::nextElement (  ) 

Returns the next element in the list.

This member function also make the iterator point to the next element of the list.

Returns:
The next element of the list.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.