IRISLIB database
LineIO Class Reference

Aggregation holder class for methods implemented in those Stream classes that support line-by-line Read and Write operations. More...

Inheritance diagram for LineIO:

Public Member Functions

_.Library.String ReadLine (_.Library.Integer pMaxReadLen, _.Library.Numeric pTimeout, _.Library.Status pSC, _.Library.String pLineTerminator)
 Read until pMaxReadLen chars are gotten, pTimeout expires, or a LineTerminator character is found. More...
 
 WriteLine (_.Library.String pLine, _.Library.Boolean pFlush, _.Library.Status pSC)
 Write pLine to the stream buffer, followed by the current LineTerminator characters. More...
 

Public Attributes

 LineTerminator
 A string of characters that will be written at the end of each WriteLine operation, and any of which will terminate a ReadLine() operation if it is encountered. More...
 

Detailed Description

Aggregation holder class for methods implemented in those Stream classes that support line-by-line Read and Write operations.

Member Function Documentation

◆ ReadLine()

_.Library.String ReadLine ( _.Library.Integer  pMaxReadLen,
_.Library.Numeric  pTimeout,
_.Library.Status  pSC,
_.Library.String  pLineTerminator 
)

Read until pMaxReadLen chars are gotten, pTimeout expires, or a LineTerminator character is found.

On return, if pTimeout=0 it means no timeout occurred. If pTimeout=0 and the returned string contains the full pMaxReadLen characters, it means no LineTerminator was encountered yet, even if the following character would be a LineTerminator. If pTimeout=0 and the returned string is shorter than pMaxReadLen, then either a LineTerminator or the End Of Stream (AtEnd = 1) was encountered. If pLineTerminator is defined, then the line is read until one of the given characters is encountered. On return, pLineTerminator contains the encountered character(s) if any.

Reimplemented in TelnetStream, StringStream, MetaCharacterStream, FileStream, and DeviceStream.

◆ WriteLine()

WriteLine ( _.Library.String  pLine,
_.Library.Boolean  pFlush,
_.Library.Status  pSC 
)

Write pLine to the stream buffer, followed by the current LineTerminator characters.

If pFlush is True, ensure that the characters are actually sent to the stream.

Note: No pLineTerminator argument because delegators always call Write() not WriteLine()

Reimplemented in TelnetStream.

Member Data Documentation

◆ LineTerminator

LineTerminator

A string of characters that will be written at the end of each WriteLine operation, and any of which will terminate a ReadLine() operation if it is encountered.

(Note: special-case handling will treat CR/LF input sequences as a single terminator.)