SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
RWWCharOutputStream Class Reference

Handle class for all the wide character output stream implementation classes. More...

#include <rw/stream/RWWCharOutputStream.h>

Inheritance diagram for RWWCharOutputStream:
RWHandleBase RWWCharArrayOutputStream

Public Member Functions

 RWWCharOutputStream (const RWWCharOutputStream &handle)
 
 RWWCharOutputStream (RWWCharOutputStreamImp *ptr)
 
void close ()
 
void flush ()
 
bool isBad () const
 
bool isFail () const
 
bool isGood () const
 
RWWCharOutputStreamoperator<< (RWWCharOutputStream &(*pf)(RWWCharOutputStream &))
 
RWWCharOutputStream operator<< (RWWCharOutputStream(*pf)(RWWCharOutputStream &))
 
RWWCharOutputStreamoperator<< (wchar_t wcharValue)
 
RWWCharOutputStreamoperator= (const RWWCharOutputStream &handle)
 
void write (const wchar_t *wcharArray, RWSize numWChars)
 
void write (wchar_t wcharValue)
 
- Public Member Functions inherited from RWHandleBase
bool isValid (void) const
 
bool operator!= (const RWHandleBase &second) const
 
bool operator== (const RWHandleBase &second) const
 

Friends

class RWTStreamGuardImp< RWWCharOutputStream, RWFilteredWCharOutputStreamImp >
 

Related Symbols

(Note that these are not member symbols.)

RWWCharOutputStreamrwEndl (RWWCharOutputStream &stream)
 
RWWCharOutputStreamrwEnds (RWWCharOutputStream &stream)
 
RWWCharOutputStreamrwFlush (RWWCharOutputStream &stream)
 
RWWCharOutputStream rwGuard (RWWCharOutputStream &stream)
 

Additional Inherited Members

- Protected Member Functions inherited from RWHandleBase
 RWHandleBase (const RWHandleBase &second)
 
 RWHandleBase (RWBodyBase *body)
 
 RWHandleBase (RWStaticCtor)
 
 RWHandleBase (void)
 
 ~RWHandleBase (void)
 
RWBodyBasebody (void) const
 
RWHandleBaseoperator= (const RWHandleBase &second)
 

Detailed Description

Handle class for all the wide character output stream implementation classes. Implements the handle idiom from the handle-body pattern.

Constructor & Destructor Documentation

◆ RWWCharOutputStream() [1/2]

RWWCharOutputStream::RWWCharOutputStream ( RWWCharOutputStreamImp * ptr)
inlineexplicit

Constructor.

◆ RWWCharOutputStream() [2/2]

RWWCharOutputStream::RWWCharOutputStream ( const RWWCharOutputStream & handle)
inline

Copy constructor.

Parameters
handleA wide character stream handle used to initialize the newly created handle.

Member Function Documentation

◆ close()

void RWWCharOutputStream::close ( )
inline

Closes the stream.

◆ flush()

void RWWCharOutputStream::flush ( )
inline

Flushes the stream.

◆ isBad()

bool RWWCharOutputStream::isBad ( ) const
inline

Returns true to indicate a loss of integrity resulting from an output operation. Throws no exceptions.

◆ isFail()

bool RWWCharOutputStream::isFail ( ) const
inline

Returns true to indicate that an output operation failed to generate the desired data. Throws no exceptions.

◆ isGood()

bool RWWCharOutputStream::isGood ( ) const
inline

Returns true to indicate a stream in a valid state. Throws no exceptions.

◆ operator<<() [1/3]

RWWCharOutputStream & RWWCharOutputStream::operator<< ( RWWCharOutputStream &(* pf )(RWWCharOutputStream &))
inline

Inserter executing a manipulator function.

Parameters
pfThe manipulator's function pointer.

◆ operator<<() [2/3]

RWWCharOutputStream RWWCharOutputStream::operator<< ( RWWCharOutputStream(* pf )(RWWCharOutputStream &))
inline

Inserter executing a manipulator function.

Parameters
pfThe manipulator's function pointer.

◆ operator<<() [3/3]

RWWCharOutputStream & RWWCharOutputStream::operator<< ( wchar_t wcharValue)
inline

Writes a single wide character to the stream.

Parameters
wcharValueThe wide character to be written to the stream.

◆ operator=()

RWWCharOutputStream & RWWCharOutputStream::operator= ( const RWWCharOutputStream & handle)
inline

Assignment operator. Throws no exceptions.

Parameters
handleA wide character stream handle used to initialize this handle.

◆ write() [1/2]

void RWWCharOutputStream::write ( const wchar_t * wcharArray,
RWSize numWChars )
inline

Writes an array of wide characters to the stream.

Parameters
wcharArrayA pointer to the first element of the array.
numWCharsThe number of wide characters to be written to the stream.

◆ write() [2/2]

void RWWCharOutputStream::write ( wchar_t wcharValue)
inline

Writes a single wide character to the stream.

Parameters
wcharValueThe wide character to be written to the stream.

Friends And Related Symbol Documentation

◆ rwEndl()

RWWCharOutputStream & rwEndl ( RWWCharOutputStream & stream)
related

Manipulator that writes an end-of-line control character to the stream.

Parameters
streamA wide character output stream.

◆ rwEnds()

RWWCharOutputStream & rwEnds ( RWWCharOutputStream & stream)
related

Manipulator that writes an end-of-string character to the stream.

Parameters
streamA wide character output stream.

◆ rwFlush()

RWWCharOutputStream & rwFlush ( RWWCharOutputStream & stream)
related

Manipulator that flushes a wide character output stream.

Parameters
streamThe wide character stream to be flushed.

◆ rwGuard()

RWWCharOutputStream rwGuard ( RWWCharOutputStream & stream)
related
Header File
#include <rw/stream/RWGuardedWCharOutputStreamImp.h>

Manipulator that is used to guard a series of insertion operations.

Parameters
streamA wide character output stream.

A rwGuard() manipulator creates a temporary guarded stream that locks the internal mutex of the preceding synchronized stream. In this way, any insertions following the manipulator within the statement will be atomic, that is, uninterrupted by any other threads. Note that if the preceding stream is not a synchronized stream, the rwGuard() manipulator has no effect.

// Lock the stream for the duration of all three insertions:
ostr << rwGuard << data1 << data2 << data3;
RWWCharOutputStream rwGuard(RWWCharOutputStream &stream)

Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.