SourcePro® API Reference Guide

 
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions
RWWCharToWStreambufOutputStreamImp Class Reference

Concrete class connecting a wide character stream to an iostreams wide character buffer. More...

#include <rw/stream/RWWCharToWStreambufOutputStreamImp.h>

Inheritance diagram for RWWCharToWStreambufOutputStreamImp:
RWWCharOutputStreamImp RWOutputStreamImp RWStreamImp RWBodyBase RWTCountingBody< RWMutexLock > RWTMonitor< RWMutexLock >

Public Member Functions

virtual ~RWWCharToWStreambufOutputStreamImp ()
 
virtual void close ()
 
virtual void flush ()
 
virtual bool isBad () const
 
virtual bool isFail () const
 
virtual bool isGood () const
 
virtual void write (wchar_t wcharValue)
 
virtual void write (const wchar_t *wcharArray, RWSize numWChars)
 
- Public Member Functions inherited from RWWCharOutputStreamImp
virtual ~RWWCharOutputStreamImp ()
 
virtual RWWCharOutputStream acquire ()
 
virtual void release ()
 
- Public Member Functions inherited from RWOutputStreamImp
virtual ~RWOutputStreamImp ()
 
- Public Member Functions inherited from RWStreamImp
virtual ~RWStreamImp ()
 

Static Public Member Functions

static RWWCharOutputStream make (std::wstreambuf &sink)
 

Protected Member Functions

 RWWCharToWStreambufOutputStreamImp (std::wstreambuf &sinkBuff)
 
std::wstreambuf & getSinkBuff ()
 
const std::wstreambuf & getSinkBuff () const
 
- Protected Member Functions inherited from RWWCharOutputStreamImp
 RWWCharOutputStreamImp ()
 
- Protected Member Functions inherited from RWOutputStreamImp
 RWOutputStreamImp ()
 
- Protected Member Functions inherited from RWStreamImp
 RWStreamImp ()
 
- Protected Member Functions inherited from RWBodyBase
 RWBodyBase (void)
 
 RWBodyBase (RWStaticCtor)
 
 RWBodyBase (const RWBodyBase &second)
 
virtual ~RWBodyBase (void)
 
RWBodyBaseoperator= (const RWBodyBase &second)
 
- Protected Member Functions inherited from RWTCountingBody< RWMutexLock >
 RWTCountingBody (unsigned initCount=0)
 
 RWTCountingBody (RWStaticCtor)
 
 RWTCountingBody (const RWTCountingBody< RWMutexLock > &second)
 
RWTCountingBody< RWMutexLock > & operator= (const RWTCountingBody< RWMutexLock > &second)
 
 ~RWTCountingBody (void)
 
unsigned addReference (void)
 
unsigned references (void) const
 
unsigned removeReference (void)
 
- Protected Member Functions inherited from RWTMonitor< RWMutexLock >
 RWTMonitor ()
 
 RWTMonitor (RWStaticCtor)
 
 RWTMonitor (const RWTMonitor< RWMutexLock > &second)
 
 ~RWTMonitor ()
 
void acquire ()
 
bool isAcquired () const
 
RWTMonitor< RWMutexLock > & monitor () const
 
RWMutexLockmutex ()
 
RWTMonitor< RWMutexLock > & operator= (const RWTMonitor< RWMutexLock > &)
 
void release ()
 
bool tryAcquire ()
 

Additional Inherited Members

- Protected Types inherited from RWTCountingBody< RWMutexLock >
typedef RWTLockGuard< RWTMonitor< RWMutexLock > > LockGuard
 
typedef RWTTryLockGuard< RWTMonitor< RWMutexLock > > TryLockGuard
 
typedef RWTUnlockGuard< RWTMonitor< RWMutexLock > > UnlockGuard
 
- Protected Types inherited from RWTMonitor< RWMutexLock >
typedef RWTLockGuard< RWTMonitor< RWMutexLock > > LockGuard
 
typedef RWTTryLockGuard< RWTMonitor< RWMutexLock > > TryLockGuard
 
typedef RWTUnlockGuard< RWTMonitor< RWMutexLock > > UnlockGuard
 

Detailed Description

Concrete class connecting a wide character stream to an iostreams wide character buffer. The iostreams buffer is used as the sink for the wide characters written to the wide character stream. Implements the body idiom from the handle-body pattern.

Constructor & Destructor Documentation

virtual RWWCharToWStreambufOutputStreamImp::~RWWCharToWStreambufOutputStreamImp ( )
virtual

Destructor.

RWWCharToWStreambufOutputStreamImp::RWWCharToWStreambufOutputStreamImp ( std::wstreambuf &  sinkBuff)
inlineprotected

Initializes the reference to the iostreams std::wstreambuf, that will be used as the sink of wide characters.

Parameters
sinkBuffThe iostreams std::wstreambuf that will serve as the sink of wide characters.

Member Function Documentation

virtual void RWWCharToWStreambufOutputStreamImp::close ( )
virtual

This function calls flush(). The user is responsible for closing the iostreams std::wstreambuf used as the sink of wide characters if necessary.

Reimplemented from RWOutputStreamImp.

virtual void RWWCharToWStreambufOutputStreamImp::flush ( )
virtual

Forward the flush() request to the iostreams std::wstreambuf.

Implements RWOutputStreamImp.

std::wstreambuf& RWWCharToWStreambufOutputStreamImp::getSinkBuff ( )
inlineprotected

Returns a reference to the iostreams std::wstreambuf, which is used as the sink of wide characters. Throws no exceptions.

const std::wstreambuf& RWWCharToWStreambufOutputStreamImp::getSinkBuff ( ) const
inlineprotected

Returns a reference to the iostreams std::wstreambuf, which is used as the sink of wide characters. Throws no exceptions.

virtual bool RWWCharToWStreambufOutputStreamImp::isBad ( ) const
virtual

Returns true if the last operation performed on the iostreams std::wstreambuf failed. Throws no exceptions.

Implements RWStreamImp.

virtual bool RWWCharToWStreambufOutputStreamImp::isFail ( ) const
virtual

Returns true if the last operation performed on the iostreams std::wstreambuf failed. Throws no exceptions.

Implements RWStreamImp.

virtual bool RWWCharToWStreambufOutputStreamImp::isGood ( ) const
virtual

Returns true if the last operation performed on the iostreams std::wstreambuf succeeded. Throws no exceptions.

Implements RWStreamImp.

static RWWCharOutputStream RWWCharToWStreambufOutputStreamImp::make ( std::wstreambuf &  sink)
inlinestatic

Constructs an RWWCharToWStreambufOutputStreamImp instance that uses sink as its sink of wide characters, and returns a handle to it. Throws no exceptions.

Parameters
sinkThe iostreams std::wstreambuf that is used as the sink of wide characters.
virtual void RWWCharToWStreambufOutputStreamImp::write ( wchar_t  wcharValue)
virtual

Writes a single wide character to the iostreams std::wstreambuf.

Parameters
wcharValueThe wide character to be written.

Implements RWWCharOutputStreamImp.

virtual void RWWCharToWStreambufOutputStreamImp::write ( const wchar_t *  wcharArray,
RWSize  numWChars 
)
virtual

Writes an array of wide characters to the iostreams std::wstreambuf.

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

Implements RWWCharOutputStreamImp.

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