IoDualInOutputStreamInterface Class Reference

#include <iostream_dualinoutput.h>

Inheritance diagram for IoDualInOutputStreamInterface:

Detailed Description

Advanced Interface of InOutputStreamInterface which allows to create an InOutputStreamInterface where the read and write has two different stream handles. One stream is for reading, the other for writing data.

  • GetError() returns the error code of the input stream and if this has no error, of the output stream.
  • SetError() sets the error code in both streams.
  • GetPosition(), GetLength(), SeekSupported(), Seek() are not allowed to call because it's not defined which stream is meant. Use GetInputStream().function() instead.
  • Close() closes both streams.

Public Member Functions

MAXON_METHOD Result< void > SetInputStream (const InputStreamRef &inputStream)
 
MAXON_METHOD Result< void > SetOutputStream (const OutputStreamRef &outputStream)
 
MAXON_METHOD InputStreamRef GetInputStream () const
 
MAXON_METHOD OutputStreamRef GetOutputStream () const
 

Private Member Functions

 MAXON_INTERFACE (IoDualInOutputStreamInterface, MAXON_REFERENCE_NORMAL, "net.maxon.interface.iodualinoutputstream")
 

Member Function Documentation

◆ MAXON_INTERFACE()

MAXON_INTERFACE ( IoDualInOutputStreamInterface  ,
MAXON_REFERENCE_NORMAL  ,
"net.maxon.interface.iodualinoutputstream"   
)
private

◆ SetInputStream()

MAXON_METHOD Result<void> SetInputStream ( const InputStreamRef &  inputStream)

Sets the handle for the input stream used for reading.

Parameters
[in]inputStreamReference to the stream used for read.
Returns
OK on success.

◆ SetOutputStream()

MAXON_METHOD Result<void> SetOutputStream ( const OutputStreamRef &  outputStream)

Sets the handle for the output stream used for writing.

Parameters
[in]outputStreamReference to the stream used for write.
Returns
OK on success.

◆ GetInputStream()

MAXON_METHOD InputStreamRef GetInputStream ( ) const

Returns the handle used for reading.

◆ GetOutputStream()

MAXON_METHOD OutputStreamRef GetOutputStream ( ) const

Returns the handle used for writing.