SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
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 (const RWCharArrayOutputStream &handle)
 
 RWCharArrayOutputStream (RWCharArrayOutputStreamImp *body)
 
void clear ()
 
char * getCharacterArray ()
 
RWSize getCharacterArraySize () const
 
RWCString getString ()
 
RWCharArrayOutputStreamoperator= (const RWCharArrayOutputStream &handle)
 
- Public Member Functions inherited from RWCharOutputStream
 RWCharOutputStream (const RWCharOutputStream &handle)
 
 RWCharOutputStream (RWCharOutputStreamImp *ptr)
 
void close ()
 
void flush ()
 
bool isBad () const
 
bool isFail () const
 
bool isGood () const
 
RWCharOutputStreamoperator<< (char charValue)
 
RWCharOutputStreamoperator<< (const RWCString &string)
 
RWCharOutputStreamoperator<< (RWCharOutputStream &(*pf)(RWCharOutputStream &))
 
RWCharOutputStream operator<< (RWCharOutputStream(*pf)(RWCharOutputStream &))
 
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
 

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 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() [1/2]

RWCharArrayOutputStream::RWCharArrayOutputStream ( RWCharArrayOutputStreamImp * body)
inlineexplicit

Constructor.

Parameters
bodyA pointer to an implementation class supporting the abstract interface RWCharArrayOutputStreamImp.

◆ RWCharArrayOutputStream() [2/2]

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

◆ clear()

void RWCharArrayOutputStream::clear ( )
inline

Resets the underlying buffer.

◆ getCharacterArray()

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[].

◆ getCharacterArraySize()

RWSize RWCharArrayOutputStream::getCharacterArraySize ( ) const
inline

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

◆ getString()

RWCString RWCharArrayOutputStream::getString ( )
inline

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

◆ operator=()

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 © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.