SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
RWUCharOutputStream Class Reference

Handle class for the Unicode character output stream implementation classes. More...

#include <rw/stream/RWUCharOutputStream.h>

Inheritance diagram for RWUCharOutputStream:
RWHandleBase RWUCharArrayOutputStream

Public Member Functions

 RWUCharOutputStream (const RWUCharOutputStream &handle)
 
 RWUCharOutputStream (RWUCharOutputStreamImp *body)
 
void close ()
 
void flush ()
 
bool isBad () const
 
bool isFail () const
 
bool isGood () const
 
RWUCharOutputStreamoperator<< (RWUChar unicodeValue)
 
RWUCharOutputStreamoperator<< (RWUCharOutputStream &(*pf)(RWUCharOutputStream &))
 
RWUCharOutputStream operator<< (RWUCharOutputStream(*pf)(RWUCharOutputStream &))
 
RWUCharOutputStreamoperator= (const RWUCharOutputStream &handle)
 
void write (const RWUChar *unicodeArray, RWSize numUChars)
 
void write (RWUChar unicodeValue)
 
- 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< RWUCharOutputStream, RWFilteredUCharOutputStreamImp >
 

Related Symbols

(Note that these are not member symbols.)

RWUCharOutputStreamrwEndl (RWUCharOutputStream &stream)
 
RWUCharOutputStreamrwEnds (RWUCharOutputStream &stream)
 
RWUCharOutputStreamrwFlush (RWUCharOutputStream &stream)
 
RWUCharOutputStream rwGuard (RWUCharOutputStream &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 Unicode character output stream implementation classes. Implements the handle idiom from the handle-body pattern.

Constructor & Destructor Documentation

◆ RWUCharOutputStream() [1/2]

RWUCharOutputStream::RWUCharOutputStream ( RWUCharOutputStreamImp * body)
inlineexplicit

Constructor.

◆ RWUCharOutputStream() [2/2]

RWUCharOutputStream::RWUCharOutputStream ( const RWUCharOutputStream & handle)
inline

Copy constructor.

Parameters
handleA UTF-16 character stream handle used to initialize the newly created handle.

Member Function Documentation

◆ close()

void RWUCharOutputStream::close ( )
inline

Closes the stream.

◆ flush()

void RWUCharOutputStream::flush ( )
inline

Flushes the stream.

◆ isBad()

bool RWUCharOutputStream::isBad ( ) const
inline

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

◆ isFail()

bool RWUCharOutputStream::isFail ( ) const
inline

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

◆ isGood()

bool RWUCharOutputStream::isGood ( ) const
inline

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

◆ operator<<() [1/3]

RWUCharOutputStream & RWUCharOutputStream::operator<< ( RWUChar unicodeValue)
inline

Writes a single UTF-16 character to the stream.

Parameters
unicodeValueThe UTF-16 character to be written to the stream.

◆ operator<<() [2/3]

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

Inserter executing a manipulator function.

Parameters
pfThe manipulator's function pointer.

◆ operator<<() [3/3]

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

Inserter executing a manipulator function.

Parameters
pfThe manipulator's function pointer.

◆ operator=()

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

Assignment operator. Throws no exceptions.

Parameters
handleA UTF-16 character stream handle used to initialize this handle.

◆ write() [1/2]

void RWUCharOutputStream::write ( const RWUChar * unicodeArray,
RWSize numUChars )
inline

Writes an array of UTF-16 characters to the stream.

Parameters
unicodeArrayA pointer to the first element of the array.
numUCharsThe number of UTF-16 characters to be written to the stream.

◆ write() [2/2]

void RWUCharOutputStream::write ( RWUChar unicodeValue)
inline

Writes a single UTF-16 character to the stream.

Parameters
unicodeValueThe UTF-16 character to be written to the stream.

Friends And Related Symbol Documentation

◆ rwEndl()

RWUCharOutputStream & rwEndl ( RWUCharOutputStream & stream)
related

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

Parameters
streamA UTF-16 character output stream.

◆ rwEnds()

RWUCharOutputStream & rwEnds ( RWUCharOutputStream & stream)
related

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

Parameters
streamA UTF-16 character output stream.

◆ rwFlush()

RWUCharOutputStream & rwFlush ( RWUCharOutputStream & stream)
related

Manipulator that flushes a UTF-16 character output stream.

Parameters
streamThe UTF-16 character stream to be flushed.

◆ rwGuard()

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

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

Parameters
streamA UTF-16 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;
RWUCharOutputStream rwGuard(RWUCharOutputStream &stream)

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