CERN -> IPT Group -> FrameMaker at CERN
Information Service User's Guide

12.10 ISInfoDocument::Iterator


Synopsis
#include <is/infodocument.h>
IPCPartition p ( "MyPartition" );
ISInfoDocument::Iterator it ( p );


Description

This class allows sequential access to all the available IS meta-types.


Example
1: ISInfoDocument::Iterator it ( p );
2: while ( it )
3: {
4: std::cout << "class " << (*it).name() << " - " << (*it).description() << std::endl;
5: it++;
6: }


Public Constructor
Iterator( IPCPartition & p );
Constructs a new ISInfoDocument::Iterator instance in the p partition.
Iterator( const Iterator & i );
Copy constructor.


Public Member Operators
Iterator &
operator=(const Iterator & i);
Copy operator.
bool
operator()();
Returns true if the current iterator's position is valid, false otherwise.
operator bool();
Returns true if the current iterator's position is valid, false otherwise.
const ISInfoDocument &
operator*();
Returns reference to the ISInfoDocument object at the current iterator's position.
const Iterator 
operator++();
Prefix increment. Advances iterator to the next position and returns the copy of the iterator object. The iterator, which is returned points to the new position.
const Iterator &
operator++( int );
Postfix increment. Returns copy of the iterator and advances iterator to the next position. The iterator, which is returned points to the old position.
const Iterator 
operator--();
Prefix decrement. Moves iterator to the previous position and returns the copy of the iterator object. The iterator, which is returned points to the new position.
const Iterator &
operator--( int );
Postfix decrement. Returns copy of the iterator and moves iterator to the previous position. The iterator, which is returned points to the old position.


Public Member Functions
size_t
size();
Returns number of ISInfoDocument objects in the iterator.


2 July 1998 - WebMaster
Copyright © CERN 1998