Home | Libraries | People | FAQ | More |
boost::process::basic_pipe
// In header: <boost/process/pipe.hpp> template<typename CharT, typename Traits = std::char_traits<CharT> > class basic_pipe { public: // types typedef CharT char_type; typedef Traits traits_type; typedef Traits::int_type int_type; typedef Traits::pos_type pos_type; typedef Traits::off_type off_type; typedef unspecified native_handle; // construct/copy/destruct basic_pipe(); explicit basic_pipe(const std::string &); basic_pipe(const basic_pipe &); basic_pipe(basic_pipe &&); basic_pipe & operator=(const basic_pipe &); basic_pipe & operator=(basic_pipe &&); ~basic_pipe(); // public member functions native_handle native_source() const; native_handle native_sink() const; void assign_source(native_handle); void assign_sink(native_handle); int_type write(const char_type *, int_type); int_type read(char_type *, int_type); bool is_open(); void close(); };
Class implementation of a pipe.
basic_pipe
public
construct/copy/destructbasic_pipe();Default construct the pipe. Will be opened.
explicit basic_pipe(const std::string & name);Construct a named pipe.
basic_pipe(const basic_pipe & p);
Copy construct the pipe.
Note | |
---|---|
Duplicated the handles. |
basic_pipe(basic_pipe && lhs);
Move construct the pipe.
basic_pipe & operator=(const basic_pipe & p);
Copy assign the pipe.
Note | |
---|---|
Duplicated the handles. |
basic_pipe & operator=(basic_pipe && lhs);
Move assign the pipe.
~basic_pipe();
Destructor closes the handles.
basic_pipe
public member functionsnative_handle native_source() const;
Get the native handle of the source.
native_handle native_sink() const;
Get the native handle of the sink.
void assign_source(native_handle h);
Assign a new value to the source
void assign_sink(native_handle h);
Assign a new value to the sink
int_type write(const char_type * data, int_type count);Write data to the pipe.
int_type read(char_type * data, int_type count);Read data from the pipe.
bool is_open();Check if the pipe is open.
void close();Close the pipe.