12.19 ISostream
#include <is/ostream.h>
class MyInfo: public ISInfo {
publishGuts( ISostream & out ) { ... }
};
This class provides an interface for converting attributes of the user-defined information classes to 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 publishGuts method of the user-defined class which inherits from the ISInfo.
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: };
ISostream & operator<<(bool val)
ISostream & operator<<(char val)
ISostream & operator<<(unsigned char val)
ISostream & operator<<(short val)
ISostream & operator<<(unsigned short val)
ISostream & operator<<(int val)
ISostream & operator<<(unsigned int val)
ISostream & operator<<(long val)
ISostream & operator<<(unsigned long val)
ISostream & operator<<(double val)
ISostream & operator<<(float val)
ISostream & operator<<(std::string & val)
ISostream & operator<<(OWLDate & val)
ISostream & operator<<(OWLTime & val)
-
Store value of val to the IS output stream.
ISostream & operator<<(const char * str)
ISostream & operator<<(const unsigned char * str)
-
Store character string pointed by str to the IS output stream. String must be terminated by `\0' character.
ISostream & put(const bool* p, size_t size)
ISostream & put(const char* p, size_t size)
ISostream & put(const unsigned char* p, size_t size)
ISostream & put(const short* p, size_t size)
ISostream & put(const unsigned short* p, size_t size)
ISostream & put(const int* p, size_t size)
ISostream & put(const unsigned int* p, size_t size)
ISostream & put(const long* p, size_t size)
ISostream & put(const unsigned long* p, size_t size)
ISostream & put(const float* p, size_t size)
ISostream & put(const double* p, size_t size)
ISostream & put(const std::string* p, size_t size)
ISostream & put(const OWLDate* p, size_t size)
ISostream & put(const OWLTime* p, size_t size)
-
Store the vector of size elements starting at p to the IS output stream.
2 July 1998 - WebMaster | Copyright © CERN 1998 |