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

12.6 ISInfoAny

ISInfo, ISistream


Synopsis
#include <is/infoany.h>
ISInfoAny isa;


Description

This class is used to read the information which type is unknown at compilation time. The access to the information attributes is organized in a stream manner. Single attributes can be read by one of the >> operators. For the array attributes one of the get methods must be used. Each call to the >> operator or to the get method advances stream position to the next attribute. The reset method can be used to go back to the beginning of the stream.


Example
1: #include "is/isinfoany.h"
2:
3: IPCPartition partition( "MyPartition" );
4: ISInfoIterator ii( partition, "MyServer" );
5: ISInfoAny isa;
6: while ( ii() ) {
7: ii.value( isa );
8: cout << isa;
9: }


Public Member Functions
ISType::Basic
getAttributeType ( ) const;;
Returns type of the attribute at the current stream position. For the definition of the ISType::Basic enumeration see Chapter 12.17.
bool
isAttributeArray ( ) const;
Returns true if the attribute at the current stream position is an array, otherwise returns false.
size_t
countAttributes  ( ) const;
Returns a number of attributes for the information object.
void
reset ( );
Set stream position to the beginning of the stream.

The public >> operators and get member functions are inherited from the ISistream class. For their description see Chapter 12.18.


Related Global Operator
std::ostream  & operator<< ( std::ostream & out, ISInfoAny & isa );
Print out value of the isa to the standard output stream out.


2 July 1998 - WebMaster
Copyright © CERN 1998