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

12.18 ISistream


Synopsis
#include <is/istream.h>
class MyInfo: public ISInfo {
refreshGuts( ISistream & in ) { ... }
};


Description

This class provides an interface for updating attributes of the user-defined information classes from the IS internal information representation. This class has no public constructor and can not be created by the user application. The only place where user code must utilise this class is the implementation of the refreshGuts method in the user-defined class which inherits from the ISInfo.


Example
1: class Person: public ISInfo {
2: public:
3: std::string name;
4: unsigned int age;
5:
6: Person( ) : ISInfo( "Person" )
7: { ; }
8:
9: void publishGuts( ISostream & out ){
10: out << name << age;
11: }
12:
13: void refreshGuts( ISistream & in ){
14: in >> name >> age;
15: }
16: };


Public Member Operators
ISistream & operator>>(char *str)
ISistream & operator>>(unsigned char *str)
Restores a character string from the IS input stream and copies it to the str. The str must point to the memory allocated by user which must be large enough to receive the string.
ISistream & operator>>(char **str)
ISistream & operator>>(unsigned char **str)
Restores a character string from the IS input stream and copies it to *str. This operator allocates the necessary amount of memory. The user is responsible for freeing the allocated memory.
ISistream & operator>>(bool& val)
ISistream & operator>>(char& val)
ISistream & operator>>(unsigned char& val)
ISistream & operator>>(short& val) 
ISistream & operator>>(unsigned short& val) 
ISistream & operator>>(int& val) 
ISistream & operator>>(unsigned int& val) 
ISistream & operator>>(long& val) 
ISistream & operator>>(unsigned long& val) 
ISistream & operator>>(float& val)
ISistream & operator>>(double& val)
ISistream & operator>>(std::string& val)
ISistream & operator>>(OWLDate& val)
ISistream & operator>>(OWLTime& val)
Get the next value of one of the IS basic types from the IS input stream and store it in the val.


Public member functions
ISistream & get( bool ** p, size_t & size );
ISistream & get( char ** p, size_t & size );
ISistream & get( unsigned char ** p, size_t & size );
ISistream & get( short ** p, size_t & size );
ISistream & get( unsigned short ** p, size_t & size );
ISistream & get( int ** p, size_t & size );
ISistream & get( unsigned int ** p, size_t & size );
ISistream & get( long ** p, size_t & size );
ISistream & get( unsigned long ** p, size_t & size );
ISistream & get( float ** p, size_t & size );
ISistream & get( double ** p, size_t & size );
ISistream & get( std::string ** p, size_t & size );
ISistream & get( OWLDate ** p, size_t & size );
ISistream & get( OWLTime ** p, size_t & size );
Read vector of values of one of the IS basic types from the IS input stream and store them in the array beginning at *p. Store size of the vector in the size. This function allocates the necessary amount of memory to store the array. User is responsible for freeing this memory.
ISistream & get( bool * const p, const size_t size );
ISistream & get( char * const p, const size_t size );
ISistream & get( unsigned char * const p, const size_t size );
ISistream & get( short * const p, const size_t size );
ISistream & get( unsigned short * const p, const size_t size );
ISistream & get( int * const p, const size_t size );
ISistream & get( unsigned int * const p, const size_t size );
ISistream & get( long * const p, const size_t size );
ISistream & get( unsigned long * const p, const size_t size );
ISistream & get( float * const p, const size_t size );
ISistream & get( double * const p, const size_t size );
ISistream & get( std::string * const p, const size_t size );
ISistream & get( OWLDate * const p, const size_t size );
ISistream & get( OWLTime * const p, const size_t size );
Read vector of not more then size values of one of the IS basic types from the IS input stream and store them in the array beginning at p. Array p must have enough space to store size elements. If size is less then actual number of elements of the array in the IS stream, only first size elements will be stored, the others will be lost.


2 July 1998 - WebMaster
Copyright © CERN 1998