ALib C++ Framework
by
Library Version: 2511 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::strings::compatibility::std::IStreamReader Class Reference

Description:

This class is a helper-class that converts narrow string data read from an object of type std::istream to the default character type.

See also
Class OStreamWriter.

Definition at line 444 of file stdiostream.mpp.

Public Method Index:

 IStreamReader (integer bufferSize=4096, integer maxLineWidth=4096)
::std::istream * GetStream ()
bool IsEOF ()
void Read (NAString &target)
void Read (WAString &target)
void SetStream (::std::istream *is)

Protected Field Index:

NAString converter
 The string buffer used for conversion.
compatibility::std::TIStreamLine< ncharreadOp

Field Details:

◆ converter

NAString alib::strings::compatibility::std::IStreamReader::converter
protected

The string buffer used for conversion.

Definition at line 448 of file stdiostream.mpp.

◆ readOp

compatibility::std::TIStreamLine<nchar> alib::strings::compatibility::std::IStreamReader::readOp
protected

The input stream as provided with SetStream. Will be set to the std::cin, respectively std::win in the constructor.

Definition at line 452 of file stdiostream.mpp.

Constructor(s) / Destructor Details:

◆ IStreamReader()

alib::strings::compatibility::std::IStreamReader::IStreamReader ( integer bufferSize = 4096,
integer maxLineWidth = 4096 )
inline

Constructor.Invokes SetStream passing std::cin.

Parameters
bufferSizeThe number of characters that the buffer is increased while reading parts of the line. Defaults to 4096 characters.
maxLineWidthThe maximum length of a single line to be read. Longer lines get truncated. Defaults to 4096 characters.

Definition at line 461 of file stdiostream.mpp.

Method Details:

◆ GetStream()

::std::istream * alib::strings::compatibility::std::IStreamReader::GetStream ( )
inline

Returns the input stream previously set with SetStream.

Returns
The input stream set with SetStream.

Definition at line 471 of file stdiostream.mpp.

◆ IsEOF()

bool alib::strings::compatibility::std::IStreamReader::IsEOF ( )
inline

Returns true if the input stream signaled its end, false otherwise.

Returns
true if the input stream is known to be at its end, false otherwise.

Definition at line 475 of file stdiostream.mpp.

◆ Read() [1/2]

void alib::strings::compatibility::std::IStreamReader::Read ( NAString & target)
inline

Reads one line of text from the input stream into a narrow string.

Parameters
targetThe storage buffer for the string to read. This string will be cleared independent of the availability of input data.

Definition at line 481 of file stdiostream.mpp.

◆ Read() [2/2]

void alib::strings::compatibility::std::IStreamReader::Read ( WAString & target)
inline

Reads one line of text from the internal input stream into a wide string.

Parameters
targetThe storage buffer for the string to read. This string will be cleared independent of the availability of input data.

Definition at line 486 of file stdiostream.mpp.

◆ SetStream()

void alib::strings::compatibility::std::IStreamReader::SetStream ( ::std::istream * is)
inline

Sets the input stream.

Parameters
isPointer to the input stream to read from to.

Definition at line 467 of file stdiostream.mpp.


The documentation for this class was generated from the following file: