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.
◆ converter
| NAString alib::strings::compatibility::std::IStreamReader::converter |
|
protected |
◆ readOp
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.
◆ IStreamReader()
| alib::strings::compatibility::std::IStreamReader::IStreamReader |
( |
integer | bufferSize = 4096, |
|
|
integer | maxLineWidth = 4096 ) |
|
inline |
Constructor.Invokes SetStream passing std::cin.
- Parameters
-
| bufferSize | The number of characters that the buffer is increased while reading parts of the line. Defaults to 4096 characters. |
| maxLineWidth | The 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.
◆ 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
-
| target | The 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
-
| target | The 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
-
| is | Pointer 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: