Program in "Listing 8.1" shows how to read all information objects from the given IS server using ISInfoStream class.
In line 13 the ISInfoStream is created for the "MyServer" IS server. The lines 14-20 show how to retrieve information from the ISInfoStream. Each call to the stream input operator removes the head object from the stream and assigns it to the given ISInfo object. Before calling it next time a program must the that the stream is not empty by calling the ISInfoStream::eof function (line 14).
There is very important distinction between the ISInfoStream public functions (like name and type) which return the respective attributes of the IS object at the current stream position and the ISInfoStream input operator function. While the former ones do not change the current streams position and can be called many times returning always the same result, the input operator removed the current object from the stream after reading it and changes the current stream position to the next available object.| 2 July 1998 - WebMaster | Copyright © CERN 1998 |