SourcePro® API Reference Guide

 
List of all members | Public Member Functions
RWCharArrayOutputStream Class Reference

Handle class for narrow character output streams that allow retrieval of their inserted data as a narrow character array. More...

#include <rw/stream/RWCharArrayOutputStream.h>

Inheritance diagram for RWCharArrayOutputStream:
RWCharOutputStream RWHandleBase

Public Member Functions

 RWCharArrayOutputStream (RWCharArrayOutputStreamImp *body)
 
 RWCharArrayOutputStream (const RWCharArrayOutputStream &handle)
 
void clear ()
 
char * getCharacterArray ()
 
RWSize getCharacterArraySize () const
 
RWCString getString ()
 
RWCharArrayOutputStreamoperator= (const RWCharArrayOutputStream &handle)
 
- Public Member Functions inherited from RWCharOutputStream
 RWCharOutputStream (RWCharOutputStreamImp *ptr)
 
 RWCharOutputStream (const RWCharOutputStream &handle)
 
void close ()
 
void flush ()
 
bool isBad () const
 
bool isFail () const
 
bool isGood () const
 
RWCharOutputStreamoperator<< (RWCharOutputStream &(*pf)(RWCharOutputStream &))
 
RWCharOutputStream operator<< (RWCharOutputStream(*pf)(RWCharOutputStream &))
 
RWCharOutputStreamoperator<< (char charValue)
 
RWCharOutputStreamoperator<< (const RWCString &string)
 
RWCharOutputStreamoperator= (const RWCharOutputStream &handle)
 
void write (char charValue)
 
void write (const char *charArray, RWSize numChars)
 
void write (const RWCString &string)
 
- Public Member Functions inherited from RWHandleBase
bool isValid (void) const
 
bool operator!= (const RWHandleBase &second) const
 
bool operator< (const RWHandleBase &second) const
 
bool operator== (const RWHandleBase &second) const
 

Additional Inherited Members

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

Detailed Description

Handle class for narrow character output streams that support an extended interface that allows retrieval of their inserted data as a narrow character array. Implements the handle idiom from the handle-body pattern.

Constructor & Destructor Documentation

RWCharArrayOutputStream::RWCharArrayOutputStream ( RWCharArrayOutputStreamImp body)
inlineexplicit

Constructor.

Parameters
bodyA pointer to an implementation class supporting the abstract interface RWCharArrayOutputStreamImp.
RWCharArrayOutputStream::RWCharArrayOutputStream ( const RWCharArrayOutputStream handle)
inline

Copy constructor.

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

Member Function Documentation

void RWCharArrayOutputStream::clear ( void  )
inline

Resets the underlying buffer.

char* RWCharArrayOutputStream::getCharacterArray ( )
inline

Returns a pointer to an array of narrow characters containing the characters inserted into the stream since its creation. Users are responsible for freeing the memory associated with the array returned by this function using operator delete[].

RWSize RWCharArrayOutputStream::getCharacterArraySize ( ) const
inline

Returns the size of the narrow character array that would be returned by a call to function getCharacterArray().

RWCString RWCharArrayOutputStream::getString ( )
inline

Returns a narrow character string object containing the characters inserted into the stream since its creation.

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

Assignment operator. Throws no exceptions.

Parameters
handleA narrow character array stream handle used to initialize this handle.

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