RWGDlistIterator man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



RWGDlistIterator(3C++)					RWGDlistIterator(3C++)

Name
     RWGDlistIterator(type) - Rogue Wave library class

Synopsis
	      #include <rw/gdlist.h>

	      declare(RWGDlist, type)
	  RWGDlist(type) a;
	  RWGDlistIterator(type) I(a) ;

Description
     Iterator for class RWGDlist(type), which allows sequential access to all
     the elements of a doubly-linked list.  Elements are accessed in order, in
     either direction.	As with all Rogue Wave iterators, the "current item"
     is undefined immediately after construction -- you must define it by
     using operator() or some other (valid) operation.	Once the iterator has
     advanced beyond the end of the collection it is no longer valid --
     continuing to use it will bring undefined results.	 In order to simplify
     the documentation below, an imaginary typedef

	      typedef RWBoolean (*yourTester)(const type*, const void*);

     has been used.  See the documentation for class RWGDlist(type) for an
     explanation of this function.

Persistence
     None

Example
     See class RWGDlist(type)

Public Constructor
	      RWGDlistIterator(type)( RWGDlist(type)& list);

     Construct an iterator for the RWGDlist(type) list.	 Immediately after

									Page 1

RWGDlistIterator(3C++)					RWGDlistIterator(3C++)

     construction, the position of the iterator is undefined.

Public Member Operators
	      type*
	  operator()();

     Advances the iterator to the next item and returns it.  Returns nil if at
     the end of the collection.

	      void
	  operator++();

     Advances the iterator one item.

	      void
	  operator--();

     Moves the iterator back one item.

	      void
	  operator+=(size_t n);

     Advances the iterator n items.

	      void
	  operator-=(size_t n);

     Moves the iterator back n items.

Public Member Functions
	      RWBoolean
	  atFirst() const;

     Returns TRUE if the iterator is at the start of the list, FALSE
     otherwise;

	      RWBoolean
	  atLast() const;

     Returns TRUE if the iterator is at the end of the list, FALSE otherwise;

	      type*
	  findNext(yourTester t,const type* d);

									Page 2

RWGDlistIterator(3C++)					RWGDlistIterator(3C++)

     Moves the iterator to the next item for which the function pointed to by
     t finds a match with d and returns it.  Returns nil if no match is found,
     in which case the position of the iterator will be undefined.

	      type*
	  findNextReference(const type* e);

     Moves the iterator to the next item with the address e and returns it.
     Returns nil if no match is found, in which case the position of the
     iterator will be undefined.

	      type*
	  insertAfterPoint(type* a);

     Adds item a after the current iterator position and return the item.  The
     position of the iterator is left unchanged.

	      type*
	  key() const;

     Returns the item at the current iterator position.

	      type*
	  remove();

     Removes and returns the item at the current cursor position.  Afterwards,
     the iterator will be positioned at the previous item in the list.

	      type*
	  removeNext(yourTester t, const type* d);

     Moves the iterator to the next item for which the function pointed to by
     t finds a "match" with d and removes and returns it.  Returns nil if no
     match is found, in which case the position of the iterator will be
     undefined.

	      type*
	  removeNextReference(const type* a);

     Moves the iterator to the next item with the address e and removes and
     returns it.  Returns nil if no match is found, in which case the position
     of the iterator will be undefined.

	      void
	  reset();

									Page 3

RWGDlistIterator(3C++)					RWGDlistIterator(3C++)

     Resets the iterator to its initial state.

	      void
	  toFirst();

     Moves the iterator to the first item in the list.

	      void
	  toLast();

     Moves the iterator to the last item in the list.

									Page 4

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net