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

15.18 ISServerIterator


Synopsis
#include <is/serveriterator.h>
IPCPartiiton p( "MyPartition" );
ISServerIterator it( p );


Description

This class enumerates IS servers for the IS repository in a particular partition.

The "current item" is undefined immediately after construction - one must define it by using operator() or some other valid operator.


Example
1: IPCPartition p( "MyPartition" );
2: ISServerIterator ii(p);
3: std::cout << "MyPartition has " << ii.entries() << " IS servers : " << std::endl;
4: while ( ii() )
5: std::cout << ii.name() << std::endl;


Public Constructors
ISServerIterator( const IPCPartition & partition );
Constructs new ISServerIterator object which enumerates all IS servers in the partition IPC partition.
Throws daq::is::InvalidPartition is the given partition does not exist.
ISServerIterator( const IPCPartition & partition, const std::string & regexp );
Constructs new ISServerIterator object which enumerates all IS servers, whose names match the given regexp regular expression, in the partition IPC partition.
Throws daq::is::InvalidPartition is the given partition does not exist or daq::is::InvalidCriteria is the given string is not a valid regular expression.


Public Member Operators
bool
operator()();
Advances the iterator one position. Returns true if new position is valid, false otherwise.
bool
operator++();
Advances the iterator one position. Returns true if new position is valid, false otherwise.
bool
operator--();
Retreats the iterator to the previous position. Returns true if new position is valid, false otherwise.
bool
operator++(int);
Advances the iterator one position. Returns true if new position is valid, false otherwise.
bool
operator--(int);
Retreats the iterator to the previous position. Returns true if new position is valid, false otherwise.you


Public Member Functions
size_t
entries();
Returns the number of the IS servers in the iterator.
const char *
host();
Returns the name of the host where the IS servers process at the current iterator position is running.
const char *
name();
Returns the name of the IS server at the iterator's current position.
const char *
owner();
Returns the name of the owner of the IS servers process at the current iterator position.
size_t
pid();
Returns the pid of the IS servers process at the current iterator position.
void
reset();
Resets the iterator to the state it had immediately after construction.


2 July 1998 - WebMaster
Copyright © CERN 1998