SourcePro® 2023.1 |
SourcePro® API Reference Guide |
A portable output stream based on XDR routines. More...
#include <rw/xdrstrea.h>
Public Member Functions | |
RWXDRostream (XDR *xp) | |
RWXDRostream (std::streambuf *sb) | |
RWXDRostream (std::ostream &str) | |
virtual | ~RWXDRostream () |
virtual int | bad () |
virtual void | clear (int v=0) |
virtual int | eof () |
virtual int | fail () |
virtual RWvostream & | flush () |
virtual int | good () |
virtual RWvostream & | put (char c) |
virtual RWvostream & | put (signed char c) |
virtual RWvostream & | put (unsigned char c) |
virtual RWvostream & | put (wchar_t wc) |
virtual RWvostream & | put (bool) |
virtual RWvostream & | put (short i) |
virtual RWvostream & | put (unsigned short i) |
virtual RWvostream & | put (int i) |
virtual RWvostream & | put (unsigned int i) |
virtual RWvostream & | put (long i) |
virtual RWvostream & | put (unsigned long i) |
virtual RWvostream & | put (long long i) |
virtual RWvostream & | put (unsigned long long i) |
virtual RWvostream & | put (float f) |
virtual RWvostream & | put (double d) |
virtual RWvostream & | put (long double) |
virtual RWvostream & | put (const char *v, size_t n) |
virtual RWvostream & | put (const signed char *v, size_t n) |
virtual RWvostream & | put (const unsigned char *v, size_t n) |
virtual RWvostream & | put (const wchar_t *v, size_t n) |
virtual RWvostream & | put (const bool *v, size_t n) |
virtual RWvostream & | put (const short *v, size_t n) |
virtual RWvostream & | put (const unsigned short *v, size_t n) |
virtual RWvostream & | put (const int *v, size_t n) |
virtual RWvostream & | put (const unsigned int *v, size_t n) |
virtual RWvostream & | put (const long *v, size_t n) |
virtual RWvostream & | put (const unsigned long *v, size_t n) |
virtual RWvostream & | put (const long long *v, size_t n) |
virtual RWvostream & | put (const unsigned long long *v, size_t n) |
virtual RWvostream & | put (const float *v, size_t n) |
virtual RWvostream & | put (const double *v, size_t n) |
virtual RWvostream & | put (const long double *, size_t) |
virtual RWvostream & | putChar (char c) |
virtual RWvostream & | putChar (signed char c) |
virtual RWvostream & | putChar (unsigned char c) |
virtual RWvostream & | putChar (wchar_t wc) |
virtual RWvostream & | putChars (const char *s, size_t n) |
virtual RWvostream & | putSizeT (size_t sz) |
virtual RWvostream & | putString (const char *s, size_t n) |
virtual int | rdstate () |
Public Member Functions inherited from RWvostream | |
virtual | ~RWvostream () |
void | version (unsigned v) |
unsigned | version () const |
Public Member Functions inherited from RWvios | |
operator void * () | |
Additional Inherited Members | |
Related Functions inherited from RWvostream | |
RWvostream & | operator<< (RWvostream &os, const char *s) |
RWvostream & | operator<< (RWvostream &os, char c) |
RWvostream & | operator<< (RWvostream &os, signed char c) |
RWvostream & | operator<< (RWvostream &os, unsigned char c) |
RWvostream & | operator<< (RWvostream &os, wchar_t wc) |
RWvostream & | operator<< (RWvostream &os, bool b) |
RWvostream & | operator<< (RWvostream &os, long long i) |
RWvostream & | operator<< (RWvostream &os, unsigned long long i) |
RWvostream & | operator<< (RWvostream &os, float f) |
RWvostream & | operator<< (RWvostream &os, double d) |
RWvostream & | operator<< (RWvostream &os, long double d) |
RWvostream & | operator<< (RWvostream &os, short i) |
RWvostream & | operator<< (RWvostream &os, unsigned short i) |
RWvostream & | operator<< (RWvostream &os, int i) |
RWvostream & | operator<< (RWvostream &os, unsigned int i) |
RWvostream & | operator<< (RWvostream &os, long i) |
RWvostream & | operator<< (RWvostream &os, unsigned long i) |
Class RWXDRostream is a portable output stream based on XDR routines. Class RWXDRostream encapsulates a portion of the XDR library routines that are used for external data representation. XDR routines allow programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls (RPC) are transmitted using XDR routines.
Class RWXDRostream enables outputting from a stream and encoding an XDR structure from a machine representation. RWXDRostream provides the ability to encode the standard data types and vectors of those data types.
An XDR stream must first be created by calling the appropriate creation routine. XDR streams currently exist for encoding/decoding of data to or from standard iostreams and file streams, TCP/IP connections and Unix files, and memory. These creation routines take arguments that are tailored to the specific properties of the stream. After the XDR stream has been created, it can then be used as an argument to the constructor for a RWXDRostream object.
RWXDRostream can be interrogated as to the status of the stream using member functions bad(), clear(), eof(), fail(), good(), and rdstate().
RWXDRostream::RWXDRostream | ( | XDR * | xp | ) |
Initializes an RWXDRostream from the XDR structure xp.
RWXDRostream::RWXDRostream | ( | std::streambuf * | sb | ) |
Initializes an RWXDRostream from the std::streambuf sb. sb must already be allocated.
RWXDRostream::RWXDRostream | ( | std::ostream & | str | ) |
Initializes an RWXDRistream from the std::streambuf associated with the std::istream str.
|
virtual |
Deallocates previously allocated resources.
|
inlinevirtual |
Returns a nonzero integer if the bad bit has been set. Normally this indicates that a severe error has occurred from which recovery is probably impossible.
Implements RWvostream.
|
inlinevirtual |
Sets the current error state to v. If v is zero, then this clears the error state.
Implements RWvostream.
|
inlinevirtual |
Returns a nonzero integer if an EOF
is encountered.
Implements RWvostream.
|
inlinevirtual |
Returns a nonzero integer if the failed or bad bit has been set. Normally, this indicates that some storage or retrieval has failed, but that the stream is still in a usable state.
Implements RWvostream.
|
virtual |
Sends the contents of the stream buffer to output immediately.
Implements RWvostream.
|
inlinevirtual |
Returns a nonzero integer if no error bits have been set.
Implements RWvostream.
|
virtual |
Stores the char
c to the output stream, preserving its value.
Implements RWvostream.
|
virtual |
Stores the signed char
c to the output stream, preserving its value.
Implements RWvostream.
|
virtual |
Stores the unsigned char
c to the output stream, preserving its value.
Implements RWvostream.
|
virtual |
Stores the wchar_t
wc to the output stream, preserving its value.
Implements RWvostream.
|
virtual |
Stores the bool
b to the output stream.
Implements RWvostream.
|
virtual |
Stores the short
i to the output stream.
Implements RWvostream.
|
virtual |
Stores the unsigned short
i to the output stream.
Implements RWvostream.
|
virtual |
Stores the int
i to the output stream.
Implements RWvostream.
|
virtual |
Stores the unsigned int
i to the output stream.
Implements RWvostream.
|
virtual |
Stores the long
i to the output stream.
Implements RWvostream.
|
virtual |
Stores the unsigned long
i to the output stream.
Implements RWvostream.
|
virtual |
Stores the long long
i to the output stream.
RWInternalErr | Thrown if the necessary support for storing a long long on an XDR is not available. |
long long
type. Implements RWvostream.
|
virtual |
Stores the unsigned long long
i to the output stream.
RWInternalErr | Thrown if the necessary support for storing an unsigned long long on an XDR is not available. |
unsigned long long
type. Implements RWvostream.
|
virtual |
Stores the float
f to the output stream.
Implements RWvostream.
|
virtual |
Stores the double
d to the output stream.
Implements RWvostream.
|
inlinevirtual |
RWInternalErr | This function is not supported with XDR streams. |
long double
type. Implements RWvostream.
|
virtual |
Stores the vector of n char
starting at v to the output stream. The characters should be treated as literal numbers (i.e., not as a character string).
Implements RWvostream.
|
virtual |
Stores the vector of n signed char
starting at v to the output stream. The characters should be treated as literal numbers (i.e., not as a character string).
Implements RWvostream.
|
virtual |
Stores the vector of n unsigned char
starting at v to the output stream. The characters should be treated as literal numbers (i.e., not as a character string).
Implements RWvostream.
|
virtual |
Stores the vector of n wchar_t
starting at v to the output stream. The characters should be treated as literal numbers (i.e., not as a character string).
Implements RWvostream.
|
virtual |
Stores the vector of n bool
starting at v to the output stream.
Implements RWvostream.
|
virtual |
Stores the vector of n short
starting at v to the output stream.
Implements RWvostream.
|
virtual |
Stores the vector of n unsigned short
starting at v to the output stream.
Implements RWvostream.
|
virtual |
Stores the vector of n int
starting at v to the output stream.
Implements RWvostream.
|
virtual |
Stores the vector of n unsigned int
starting at v to the output stream.
Implements RWvostream.
|
virtual |
Stores the vector of n long
starting at v to the output stream.
Implements RWvostream.
|
virtual |
Stores the vector of n unsigned long
starting at v to the output stream.
Implements RWvostream.
|
virtual |
Stores the vector of n long long
starting at v to the output stream.
RWInternalErr | Thrown if the necessary support for storing a long long on an XDR is not available. |
long long
type. Implements RWvostream.
|
virtual |
Stores the vector of n unsigned long long
starting at v to the output stream.
RWInternalErr | Thrown if the necessary support for storing an unsigned long long on an XDR is not available. |
unsigned long long
type. Implements RWvostream.
|
virtual |
Stores the vector of n float
starting at v to the output stream.
Implements RWvostream.
|
virtual |
Stores the vector of n double
starting at v to the output stream.
Implements RWvostream.
|
inlinevirtual |
RWInternalErr | This function is not supported with XDR streams. |
long double
type. Implements RWvostream.
|
inlinevirtual |
Stores the char
c to the output stream, preserving its meaning. c is treated as a character.
Implements RWvostream.
|
inlinevirtual |
Stores the signed char
c to the output stream, preserving its meaning. c is treated as a character.
Implements RWvostream.
|
inlinevirtual |
Stores the unsigned char
c to the output stream, preserving its meaning. c is treated as a character.
Implements RWvostream.
|
inlinevirtual |
Stores the wchar_t
wc to the output stream, preserving its value. wc is treated as a character.
Implements RWvostream.
|
virtual |
Stores n char
starting at s to the output stream. s is treated as a character string.
Reimplemented from RWvostream.
|
virtual |
Stores the size_t
sz to the output stream.
Implements RWvostream.
|
virtual |
Stores the character string, including embedded nulls, starting at s to the output stream.
Implements RWvostream.
|
inlinevirtual |
Returns the current error state.
Implements RWvostream.
Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |