RWbostream man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



RWbostream(3C++)					      RWbostream(3C++)

Name
     RWbostream - Rogue Wave library class

Synopsis
	      #include <rw/bstream.h>

	      // Construct an RWbostream, using cout's streambuf:
	  RWbostream bstr(cout);

Description
     Class RWbostream specializes the abstract base class RWvostream to store
     variables in binary format.  The results can be restored by using its
     counterpart RWbistream.  You can think of it as a binary veneer over an
     associated streambuf.  Because the RWbostream retains no information
     about the state of its associated streambuf, its use can be freely
     exchanged with other users of the streambuf (such as ostream or
     ofstream).	 Note that variables should not be separated with white space.
     Such white space would be interpreted literally and would have to be read
     back in as a character string.  RWbostream can be interrogated as to the
     stream state using member functions good(), bad(), eof(), etc.

Persistence
     None

Example
     See RWbistream for an example of how the file "data.dat" might be read
     back in.

	      #include <rw/bstream.h>
	  #include <fstream.h>
	  main(){
	    ofstream fstr("data.dat");	 // Open an output file
	    RWbostream bstr(fstr);	 // Construct an RWbostream from it
	    int i = 5;
	    float f = 22.1;
	    double d = -0.05;
	    bstr << i;		   // Store an int in binary
	    bstr << f << d;	   // Store a float & double
	  }

Public Constructors
	      RWbostream(streambuf* s);

     Construct an RWbostream from the streambuf s.  For DOS, the streambuf
     must have been opened in binary mode.

									Page 1

RWbostream(3C++)					      RWbostream(3C++)

	      RWbostream(ostream& str);

     Construct an RWbostream from the streambuf associated with the output
     stream str.  For DOS, the streambuf must have been opened in binary mode.
     This can be done by specifying ios::binary as part of the second argument
     to the constructor for an ofstream.  Using the example above, the line to
     create the ofstream would read, ofstream fstr("data.dat", ios::out |
     ios::binary); where the "|" is the binary OR operator.

Public Destructor
	      virtual ~RWvostream();

     This virtual destructor allows specializing classes to deallocate any
     resources that they may have allocated.

Public Operators
	      virtual RWvostream&
	  operator<<(const char* s);

     Redefined from class RWvostream.  Store the character string starting at
     s to the output stream in binary.	The character string is expected to be
     null terminated.

	      virtual RWvostream&
	  operator<<(const wchar_t* ws);

     Redefined from class RWvostream.  Store the wide character string
     starting at ws to the output stream in binary.  The wide character string
     is expected to be null terminated.

	      virtual RWvostream&
	  operator<<(char c);

     Redefined from class RWvostream.  Store the char c to the output stream
     in binary.

	      virtual RWvostream&
	  operator<<(wchar_t wc);

     Redefined from class RWvostream.  Store the wide char wc to the output
     stream in binary.

									Page 2

RWbostream(3C++)					      RWbostream(3C++)

	      virtual RWvostream&
	  operator<<(unsigned char c);

     Redefined from class RWvostream.  Store the unsigned char c to the output
     stream in binary.

	      virtual RWvostream&
	  operator<<(double d);

     Redefined from class RWvostream.  Store the double d to the output stream
     in binary.

	      virtual RWvostream&
	  operator<<(float f);

     Redefined from class RWvostream.  Store the float f to the output stream
     in binary.

	      virtual RWvostream&
	  operator<<(int i);

     Redefined from class RWvostream.  Store the int i to the output stream in
     binary.

	      virtual RWvostream&
	  operator<<(unsigned int i);

     Redefined from class RWvostream.  Store the unsigned int i to the output
     stream in binary.

	      virtual RWvostream&
	  operator<<(long l);

     Redefined from class RWvostream.  Store the long l to the output stream
     in binary.

	      virtual RWvostream&
	  operator<<(unsigned long l);

     Redefined from class RWvostream.  Store the unsigned long l to the output
     stream in binary.

	      virtual RWvostream&
	  operator<<(short s);

									Page 3

RWbostream(3C++)					      RWbostream(3C++)

     Redefined from class RWvostream.  Store the short s to the output stream
     in binary.

	      virtual RWvostream&
	  operator<<(unsigned short s);

     Redefined from class RWvostream.  Store the unsigned short s to the
     output stream in binary.

	  operator void*();

     Inherited via RWvostream from RWvios.

Public Member Functions
	      virtual RWvostream&
	  flush();

     Send the contents of the stream buffer to output immediately.

	      virtual RWvostream&
	  put(char c);

     Redefined from class RWvostream.  Store the char c to the output stream.

	      virtual RWvostream&
	  put(wchar_t wc);

     Redefined from class RWvostream.  Store the wide character wc to the
     output stream.

	      virtual RWvostream&
	  put(unsigned char c);

     Redefined from class RWvostream.  Store the unsigned char c to the output
     stream.

	      virtual RWvostream&
	  put(const char* p, size_t N);

     Redefined from class RWvostream.  Store the vector of chars starting at p
     to the output stream in binary.

									Page 4

RWbostream(3C++)					      RWbostream(3C++)

	      virtual RWvostream&
	  put(const wchar_t* p, size_t N);

     Redefined from class RWvostream.  Store the vector of wide chars starting
     at p to the output stream in binary.

	      virtual RWvostream&
	  put(const unsigned char* p, size_t N);

     Redefined from class RWvostream.  Store the vector of unsigned chars
     starting at p to the output stream in binary.

	      virtual RWvostream&
	  put(const short* p, size_t N);

     Redefined from class RWvostream.  Store the vector of shorts starting at
     p to the output stream in binary.

	      virtual RWvostream&
	  put(const unsigned short* p, size_t N);

     Redefined from class RWvostream.  Store the vector of unsigned shorts
     starting at p to the output stream in binary.

	      virtual RWvostream&
	  put(const int* p, size_t N);

     Redefined from class RWvostream.  Store the vector of ints starting at p
     to the output stream in binary.

	      virtual RWvostream&
	  put(const unsigned int* p, size_t N);

     Redefined from class RWvostream.  Store the vector of unsigned ints
     starting at p to the output stream in binary.

	      virtual RWvostream&
	  put(const long* p, size_t N);

     Redefined from class RWvostream.  Store the vector of longs starting at p
     to the output stream in binary.

	      virtual RWvostream&
	  put(const unsigned long* p, size_t N);

									Page 5

RWbostream(3C++)					      RWbostream(3C++)

     Redefined from class RWvostream.  Store the vector of unsigned longs
     starting at p to the output stream in binary.

	      virtual RWvostream&
	  put(const float* p, size_t N);

     Redefined from class RWvostream.  Store the vector of floats starting at
     p to the output stream in binary.

	      virtual RWvostream&
	  put(const double* p, size_t N);

     Redefined from class RWvostream.  Store the vector of doubles starting at
     p to the output stream in binary.

	      virtual RWvostream&
	  putString(const char* p, size_t N);

     Redefined from class RWvostream.  Data is formatted as a string
     containing N characters.

	      virtual RWvostream&
	  putString(const char*s, size_t N);

     Store the character string, including embedded nulls, starting at s to
     the output string.

									Page 6

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net