boost::process::detail::pipe Class Reference

#include <pipe.hpp>

List of all members.

Public Member Functions

 pipe ()
file_handlerend ()
file_handlewend ()


Detailed Description

Simple RAII model for anonymous pipes.

The pipe class is a simple RAII model for anonymous pipes. It provides a portable constructor that allocates a new pipe and creates a pipe object that owns the two file handles associated to it: the read end and the write end.

These handles can be retrieved for modification according to file_handle semantics. Optionally, their ownership can be transferred to external file_handle objects which comes handy when the two ends need to be used in different places (i.e. after a POSIX fork() system call).

Pipes can be copied following the same semantics as file handles. In other words, copying a pipe object invalidates the source one.

See also:
file_handle

Constructor & Destructor Documentation

boost::process::detail::pipe::pipe (  )  [inline]

Creates a new pipe.

The default pipe constructor allocates a new anonymous pipe and assigns its ownership to the created pipe object. On Windows when the macro BOOST_PROCESS_WINDOWS_USE_NAMED_PIPE is defined a named pipe is created. This is required if asynchronous I/O should be used as asynchronous I/O is only supported by named pipes on Windows.

Exceptions:
boost::system::system_error If the anonymous pipe creation fails.


Member Function Documentation

file_handle& boost::process::detail::pipe::rend (  )  [inline]

Returns the pipe's read end file handle.

Obtains a reference to the pipe's read end file handle. Care should be taken to not duplicate the returned object if ownership shall remain to the pipe.

Duplicating the returned object invalidates its corresponding file handle in the pipe.

Returns:
A reference to the pipe's read end file handle.

file_handle& boost::process::detail::pipe::wend (  )  [inline]

Returns the pipe's write end file handle.

Obtains a reference to the pipe's write end file handle. Care should be taken to not duplicate the returned object if ownership shall remain to the pipe.

Duplicating the returned object invalidates its corresponding file handle in the pipe.

Returns:
A reference to the pipe's write end file handle.


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

Generated on Mon Sep 22 01:00:43 2008 by  doxygen 1.5.5