ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
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 269 of file std_strings_iostream.hpp.

#include <std_strings_iostream.hpp>

Collaboration diagram for 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 converter
protected

The string buffer used for conversion.

Definition at line 273 of file std_strings_iostream.hpp.

◆ readOp

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

Definition at line 277 of file std_strings_iostream.hpp.

Constructor(s) / Destructor Details:

◆ StringReader()

StringReader ( )
inline

Constructor.Invokes SetStream passing std::cin.

Definition at line 284 of file std_strings_iostream.hpp.

Method Details:

◆ GetStream()

::std::istream * GetStream ( )
inline

Returns the input stream previously set with SetStream.

Returns
The input stream set with SetStream.

Definition at line 301 of file std_strings_iostream.hpp.

◆ IsEOF()

bool 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 308 of file std_strings_iostream.hpp.

◆ Read() [1/2]

void 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 317 of file std_strings_iostream.hpp.

Here is the call graph for this function:

◆ Read() [2/2]

void 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 328 of file std_strings_iostream.hpp.

Here is the call graph for this function:

◆ SetStream()

void SetStream ( ::std::istream * is)
inline

Sets the input stream.

Parameters
isPointer to the input stream to read from to.

Definition at line 294 of file std_strings_iostream.hpp.


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