SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
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 (const wchar_t *wcharArray, RWSize numWChars)
 
virtual void write (wchar_t wcharValue)
 
- 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 (const RWBodyBase &second)
 
 RWBodyBase (RWStaticCtor)
 
 RWBodyBase (void)
 
virtual ~RWBodyBase (void)
 
RWBodyBaseoperator= (const RWBodyBase &second)
 
- Protected Member Functions inherited from RWTCountingBody< RWMutexLock >
 RWTCountingBody (const RWTCountingBody< RWMutexLock > &second)
 
 RWTCountingBody (RWStaticCtor)
 
 RWTCountingBody (unsigned initCount=0)
 
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 (const RWTMonitor< RWMutexLock > &second)
 
 RWTMonitor (RWStaticCtor)
 
 RWTMonitor (void)
 
 ~RWTMonitor (void)
 
void acquire (void)
 
bool isAcquired (void) const
 
RWTMonitor< RWMutexLock > & monitor (void) const
 
RWMutexLockmutex (void)
 
RWTMonitor< RWMutexLock > & operator= (const RWTMonitor< RWMutexLock > &)
 
void release (void)
 
bool tryAcquire (void)
 

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

◆ ~RWWCharToWStreambufOutputStreamImp()

virtual RWWCharToWStreambufOutputStreamImp::~RWWCharToWStreambufOutputStreamImp ( )
virtual

Destructor.

◆ RWWCharToWStreambufOutputStreamImp()

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

◆ close()

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.

◆ flush()

virtual void RWWCharToWStreambufOutputStreamImp::flush ( )
virtual

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

Implements RWOutputStreamImp.

◆ getSinkBuff() [1/2]

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.

◆ getSinkBuff() [2/2]

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.

◆ isBad()

virtual bool RWWCharToWStreambufOutputStreamImp::isBad ( ) const
virtual

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

Implements RWStreamImp.

◆ isFail()

virtual bool RWWCharToWStreambufOutputStreamImp::isFail ( ) const
virtual

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

Implements RWStreamImp.

◆ isGood()

virtual bool RWWCharToWStreambufOutputStreamImp::isGood ( ) const
virtual

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

Implements RWStreamImp.

◆ make()

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.

◆ write() [1/2]

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.

◆ write() [2/2]

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.

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