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

7.4 Using extended criteria for information iterator

The last parameter of the ISInfoIterator constructor is of type ISCriteria. This allows to define the subsets of information, covered by the current iterator, in a very flexible way. See Subscribe using criteria for the complete description of how the ISCriteria can used. Program in "Listing 7.3" shows several examples of the ISCriteria objects.

Listing 7.3   Extended use of the IS information iterator

1: // include main IS header file
2: #inclide <Person.h>
3: #include <is/infoiterator.h>
4: #include <ipc/core.h>
5:
6: int main( int ac, char ** av )
7: {
8: // Initialise communication library
9: IPCCore::init( ac, av );
10:
11: // Create the instance of partition
12: IPCPartition partition("MyPartition");
13:
14: // iterator will contain all the objects of type Person
15: ISInfoIterator ii( p, "MyServer", Person::type() );
16:
17: // iterator will contain all the objects of any type but Persin,
18: // whose names start with capital P
19: ISInfoIterator ii( p, "MyServer", !Person::type() && "P.*" );
20:
21: return 0;
22: }

 


2 July 1998 - WebMaster
Copyright © CERN 1998