boost::process::stream_behavior Class Reference

#include <stream_behavior.hpp>

List of all members.

Public Types

enum  type {
  capture, close, inherit, redirect_to_stdout,
  silence
}

Public Member Functions

 stream_behavior ()
type get_type () const

Friends

struct detail::stream_info
stream_behavior capture_stream ()
stream_behavior close_stream ()
stream_behavior inherit_stream ()
stream_behavior redirect_stream_to_stdout ()
stream_behavior silence_stream ()


Detailed Description

Describes the possible states for a communication stream.

Member Enumeration Documentation

Describes the possible states for a communication stream.

Enumerator:
capture  The child's stream is connected to the parent by using an anonymous pipe so that they can send and receive data to/from each other.
close  The child's stream is closed upon startup so that it will not have any access to it.
inherit  The child's stream is connected to the same stream used by the parent. In other words, the corresponding parent's stream is inherited.
redirect_to_stdout  The child's stream is connected to child's standard output. This is typically used when configuring the standard error stream.
silence  The child's stream is redirected to a null device so that its input is always zero or its output is lost, depending on whether the stream is an input or an output one. It is important to notice that this is different from close because the child is still able to write data. If we closed, e.g. stdout, the child might not work at all!


Constructor & Destructor Documentation

boost::process::stream_behavior::stream_behavior (  )  [inline]

Constructs a new stream behavior of type close.

The public constructor creates a new stream behavior that defaults to the close behavior. In general, you will want to use the available free functions to construct a stream behavior (including the close one).


Member Function Documentation

type boost::process::stream_behavior::get_type (  )  const [inline]

Returns this stream's behavior type.


Friends And Related Function Documentation

stream_behavior capture_stream (  )  [friend]

Creates a new stream_behavior of type stream_behavior::capture.

Creates a new stream_behavior of type stream_behavior::capture, meaning that the child's stream is connected to the parent by using an anonymous pipe so that they can send and receive data to/from each other.

stream_behavior close_stream (  )  [friend]

Creates a new stream_behavior of type stream_behavior::close.

Creates a new stream_behavior of type stream_behavior::close, meaning that the child's stream is closed upon startup so that it will not have any access to it.

stream_behavior inherit_stream (  )  [friend]

Creates a new stream_behavior of type stream_behavior::inherit.

Creates a new stream_behavior of type stream_behavior::inherit, meaning that the child's stream is connected to the same stream used by the parent. In other words, the corresponding parent's stream is inherited.

stream_behavior redirect_stream_to_stdout (  )  [friend]

Creates a new stream_behavior of type stream_behavior::redirect_to_stdout.

Creates a new stream_behavior of type stream_behavior::redirect_to_stdout, meaning that the child's stream is connected to child's standard output. This is typically used when configuring the standard error stream.

stream_behavior silence_stream (  )  [friend]

Creates a new stream_behavior of type stream_behavior::silence.

Creates a new stream_behavior of type stream_behavior::silence, meaning that the child's stream is redirected to a null device so that its input is always zero or its output is lost, depending on whether the stream is an input or an output one. It is important to notice that this is different from close because the child is still able to write data. If we closed, e.g. stdout, the child might not work at all!


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