#include <cxxtools/pipe.h>

Inheritance diagram for cxxtools::Pipe:
cxxtools::NonCopyable cxxtools::posix::Pipe

Public Types

typedef int OpenMode

Public Member Functions

 Pipe (OpenMode mode=Sync)
 Creates the pipe with two IODevices.
 ~Pipe ()
 Destructor.
IODeviceout ()
 Endpoint of the pipe to read from.
const IODeviceout () const
IODevicein ()
 Endpoint of the pipe to write to.
const IODevicein () const
size_t write (const char *buf, size_t count)
void write (char ch)
size_t read (char *buf, size_t count)
char read ()

Static Public Attributes

static const int Sync = 0
static const int Async = 1

Protected Member Functions

PipeImpl * impl ()
const PipeImpl * impl () const

Additional Inherited Members

- Private Member Functions inherited from cxxtools::NonCopyable
 NonCopyable ()

Member Typedef Documentation

Constructor & Destructor Documentation

cxxtools::Pipe::Pipe ( OpenMode  mode = Sync)
explicit

Creates the pipe with two IODevices.

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

Reimplemented in cxxtools::posix::Pipe.

cxxtools::Pipe::~Pipe ( )

Destructor.

Destroys the pipe and closes the internal IODevices.

Member Function Documentation

PipeImpl* cxxtools::Pipe::impl ( )
inlineprotected
const PipeImpl* cxxtools::Pipe::impl ( ) const
inlineprotected
IODevice& cxxtools::Pipe::in ( )

Endpoint of the pipe to write to.

Returns
An IODevice used to write to the pipe
const IODevice& cxxtools::Pipe::in ( ) const
IODevice& cxxtools::Pipe::out ( )

Endpoint of the pipe to read from.

Returns
An IODevice used to read from the pipe
const IODevice& cxxtools::Pipe::out ( ) const
size_t cxxtools::Pipe::read ( char *  buf,
size_t  count 
)
inline

Reimplemented in cxxtools::posix::Pipe.

char cxxtools::Pipe::read ( )
inline

Reimplemented in cxxtools::posix::Pipe.

size_t cxxtools::Pipe::write ( const char *  buf,
size_t  count 
)
inline

Reimplemented in cxxtools::posix::Pipe.

void cxxtools::Pipe::write ( char  ch)
inline

Reimplemented in cxxtools::posix::Pipe.

Member Data Documentation

const int cxxtools::Pipe::Async = 1
static
const int cxxtools::Pipe::Sync = 0
static

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