ALib C++ Library
Library Version: 2510 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::strings::compatibility::std::StringReader 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
Further explanations are given with sibling class StringWriter.

Definition at line 286 of file stdiostream.mpp.

Collaboration diagram for alib::strings::compatibility::std::StringReader:
[legend]

Public Method Index:

 StringReader ()
 Constructor.Invokes SetStream passing std::cin.
 
::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::TISReadLine< ncharreadOp
 

Field Details:

◆ converter

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

The string buffer used for conversion.

Definition at line 290 of file stdiostream.mpp.

◆ readOp

compatibility::std::TISReadLine<nchar> alib::strings::compatibility::std::StringReader::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 294 of file stdiostream.mpp.

Constructor(s) / Destructor Details:

◆ StringReader()

alib::strings::compatibility::std::StringReader::StringReader ( )
inline

Constructor.Invokes SetStream passing std::cin.

Definition at line 301 of file stdiostream.mpp.

Method Details:

◆ GetStream()

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

Returns the input stream previously set with SetStream.

Returns
The input stream set with SetStream.

Definition at line 318 of file stdiostream.mpp.

◆ IsEOF()

bool alib::strings::compatibility::std::StringReader::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 325 of file stdiostream.mpp.

◆ Read() [1/2]

void alib::strings::compatibility::std::StringReader::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 334 of file stdiostream.mpp.

Here is the call graph for this function:

◆ Read() [2/2]

void alib::strings::compatibility::std::StringReader::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 345 of file stdiostream.mpp.

Here is the call graph for this function:

◆ SetStream()

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

Sets the input stream.

Parameters
isPointer to the input stream to read from to.

Definition at line 311 of file stdiostream.mpp.


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