Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWvostream


RWvostreamRWvios

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Synopsis

#include <rw/vstream.h>

Description

Class RWvostream is an abstract base class. It provides an interface for format-independent storage of fundamental types and arrays of fundamental types. Its counterpart, RWvistream, provides a complementary interface for the retrieval of variables of the fundamental types.

Because the interface of RWvistream and RWvostream is independent of formatting, the user of these classes need not care how variables are actually stored or restored. That is determined in the derived class. Storage can be done in three kinds of formats:

Note that because RWvostream is an abstract base class, there is no way to actually enforce these goals. The description here is merely the model of how a class derived from RWvistream and RWvostream should act.


NOTE:There is no need to separate variables with white space.

It is the responsibility of the derived class to delineate variables with white space, packet breaks, or whatever might be appropriate for the final output sink. In this model, variables are inserted into the output stream, either individually or as homogeneous vectors, to be restored in the same order using RWvistream.

Storage and retrieval of characters requires some explanation. Characters can be thought of as either representing some alphanumeric or control character, or as the literal number. Generally, the overloaded insertion << and extraction >> operators seek to store and restore characters, preserving their symbolic meaning; that is, storage of a newline should be restored as a newline, regardless of its representation on the target machine. By contrast, member functions get() and put() should treat the character as a literal number whose value is to be preserved. See also class RWpostream.

Example

Public Destructor

virtual 
~RWvostream();

Public Operators

virtual RWvostream&
operator<<(const char* s) = 0; 
virtual RWvostream&
operator<<(const wchar_t* ws) = 0;
virtual RWvostream&
operator<<(char c) = 0;
virtual RWvostream&
operator<<(wchar_t wc) = 0;
virtual RWvostream&
operator<<(unsigned char c) = 0;
virtual RWvostream&
operator<<(double d) = 0;
virtual RWvostream&
operator<<(float f) = 0;
virtual RWvostream&
operator<<(int i) = 0;
virtual RWvostream&
operator<<(unsigned int i) = 0;
virtual RWvostream&
operator<<(long l) = 0;
virtual RWvostream&
operator<<(unsigned long l) = 0;
virtual RWvostream&
operator<<(short s) = 0;
virtual RWvostream&
operator<<(unsigned short s) = 0;
operator void*();

Public Member Functions

virtual RWvostream&
flush();
virtual RWvostream&
put(char c) = 0; 
virtual RWvostream&
put(wchar_t wc) = 0;
virtual RWvostream&
put(unsigned char c) = 0;
virtual RWvostream&
put(const char* p, size_t N) = 0;
virtual RWvostream&
put(const wchar_t* p, size_t N) = 0; 
virtual RWvostream&
put(const unsigned char* p, size_t N) = 0;
virtual RWvostream&
put(const short* p, size_t N) = 0;
virtual RWvostream&
put(const unsigned short* p, size_t N) = 0;
virtual RWvostream&
put(const int* p, size_t N) = 0;
virtual RWvostream&
put(const unsigned int* p, size_t N) = 0;
virtual RWvostream&
put(const long* p, size_t N) = 0;
virtual RWvostream&
put(const unsigned long* p, size_t N) = 0;
virtual RWvostream&
put(const float* p, size_t N) = 0;
virtual RWvostream&
put(const double* p, size_t N) = 0;
virtual RWvostream&
putString(const char*s, size_t N); 

Related Global Operators

RWvostream&
operator<<(RWvostream&, const RWCString& str);
RWvostream&
operator<<(RWvostream&, const RWInteger& x);
RWvostream&
operator<<(RWvostream&, const RWTime& t);
RWvostream&
operator<< (RWvostream& strm, const RWTPtrDeque<T>& coll);
RWvostream&
operator<<(RWvostream& strm, const RWTPtrDlist<T>& coll); 
RWvostream&
operator<<(RWvostream& strm, 
           const RWTPtrHashMap<K,T,H,EQ>& coll);
RWvostream&
operator<<(RWvostream& strm, 
           const RWTPtrHashMultiMap<K,T,H,EQ>& coll);
RWvostream&
operator<<(RWvostream& strm, 
           const RWTPtrHashMultiSet<T,H,EQ>& coll);
RWvostream&
operator<<(RWvostream& strm, 
           const RWTPtrHashSet<T,H,EQ>& coll);
RWvostream&
operator<<(RWvostream& strm, const RWTPtrMap<K,T,C>& coll); 
RWvostream&
operator<<(RWvostream& strm, 
           const RWTPtrMultiMap<K,T,C>& coll);
RWvostream&
operator<<(RWvostream& strm, const RWTPtrMultiSet<T,C>& coll); 
RWvostream&
operator<<(RWvostream& strm, 
           const RWTPtrOrderedVector<T>& coll); 
RWvostream&
operator<<(RWFile& strm, const RWTPtrSet<T,C>& coll);
RWvostream&
operator<<(RWvostream& strm, const RWTPtrSlist<T>& coll); 
RWvostream&
operator<<(RWvostream& strm, 
           const RWTPtrSortedDlist<T,C>& coll);
RWvostream&
operator<<(RWvostream& strm, 
           const RWTPtrSortedVector<T,C>& coll);
RWvostream&
operator<<(RWvostream& strm, const RWTValDeque<T>& coll);
RWvostream&
operator<<(RWvostream& strm, const RWTValDlist<T>& coll);
RWvostream&
operator<<(RWvostream& strm, 
           const RWTValHashMap<T,H,EQ>& coll);
RWvostream&
operator<<(RWvostream& strm, 
           const RWTValHashMultiMap<K,T,H,EQ>& coll);
RWvostream&
operator<<(RWvostream& strm, 
           const RWTValHashMultiSet<T,H,EQ>& coll);
RWvostream&
operator<<(RWvostream& strm, 
           const RWTValHashSet<T,H,EQ>& coll);
RWvostream&
operator<<(RWvostream& strm, const RWTValMap<K,T,C>& coll);
RWvostream&
operator<<(RWvostream& strm, 
           const RWTValMultiMap<K,T,C>& coll);
RWvostream&
operator<<(RWvostream& strm, const RWTValMultiSet<T,C>& coll);
RWvostream&
operator<<(RWvostream& strm, 
           const RWTValOrderedVector<T>& coll);
RWvostream&
operator<<(RWvostream& strm, const RWTValSet<T,C>& coll);
RWvostream&
operator<<(RWvostream& strm, const RWTValSlist<T>& coll);
RWvostream&
operator<<(RWvostream& strm,
           const RWTValSortedDlist<T,C>& coll);
RWvostream&
operator<<(RWvostream& strm, 
           const RWTValSortedVector<T,C>& coll);


Previous fileTop of DocumentContentsIndexNext file

©Copyright 1999, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.