Pipe Class Reference

#include <Pt/System/Pipe.h>

A Pair of IODevices that form a half-duplex pipe. More...

Inherits NonCopyable.

Public Member Functions

 Pipe ()
 Creates the pipe with two IODevices. More...
 
 ~Pipe ()
 Destructor. More...
 
IODevicein ()
 Endpoint of the pipe to write to.
 
const IODevicein () const
 Endpoint of the pipe to write to.
 
IODeviceout ()
 Endpoint of the pipe to read from.
 
const IODeviceout () const
 Endpoint of the pipe to read from.
 

Detailed Description

A pipe consists of a pair of IODevices: A writable output device and a readable input device. If bytes are written to the output device they can be read from the input device in exactly the order in which they were written. Whether or not the writer to a pipe will block until the reader reads the data, or some previously-written bytes, from the pipe is system-dependent and therefore unspecified. Many pipe implementations will buffer up to a certain number of bytes between input and output, but such buffering should not be assumed.

Constructor & Destructor Documentation

Pipe ( )
explicit

The default constructor will create the pipe and the appropriate IODevices to read and write to the pipe.

~Pipe ( )

Destroys the pipe and closes the internal IODevices.