Tanl Linguistic Pipeline |
Public Types | |
typedef pbase_type::pmode | pmode |
Type used to specify how to connect to the process. | |
typedef pbase_type::argv_type | argv_type |
Type used to hold the arguments for a command. | |
Public Member Functions | |
basic_ipstream () | |
Default constructor, creates an uninitialised stream. | |
basic_ipstream (const std::string &command, pmode mode=pstdout) | |
Constructor that initialises the stream by starting a process. | |
basic_ipstream (const std::string &file, const argv_type &argv, pmode mode=pstdout) | |
Constructor that initialises the stream by starting a process. | |
~basic_ipstream () | |
Destructor. | |
void | open (const std::string &command, pmode mode=pstdout) |
Start a process. | |
void | open (const std::string &file, const argv_type &argv, pmode mode=pstdout) |
Start a process. | |
basic_ipstream & | out () |
Set streambuf to read from process' stdout . | |
basic_ipstream & | err () |
Set streambuf to read from process' stderr . |
IXE::io::basic_ipstream< CharT, Traits >::basic_ipstream | ( | const std::string & | command, | |
pmode | mode = pstdout | |||
) | [inline] |
Constructor that initialises the stream by starting a process.
Initialises the stream buffer by calling do_open() with the supplied arguments.
command | a string containing a shell command. | |
mode | the I/O mode to use when opening the pipe. |
IXE::io::basic_ipstream< CharT, Traits >::basic_ipstream | ( | const std::string & | file, | |
const argv_type & | argv, | |||
pmode | mode = pstdout | |||
) | [inline] |
Constructor that initialises the stream by starting a process.
Initialises the stream buffer by calling do_open() with the supplied arguments.
file | a string containing the pathname of a program to execute. | |
argv | a vector of argument strings passed to the new program. | |
mode | the I/O mode to use when opening the pipe. |
IXE::io::basic_ipstream< CharT, Traits >::~basic_ipstream | ( | ) | [inline] |
Destructor.
Closes the stream and waits for the child to exit.
basic_ipstream& IXE::io::basic_ipstream< CharT, Traits >::err | ( | ) | [inline] |
Set streambuf to read from process' stderr
.
*this
References IXE::io::pstream_common< CharT, Traits >::buf_, and IXE::io::basic_pstreambuf< CharT, Traits >::read_err().
void IXE::io::basic_ipstream< CharT, Traits >::open | ( | const std::string & | file, | |
const argv_type & | argv, | |||
pmode | mode = pstdout | |||
) | [inline] |
Start a process.
Starts a new process by passing command to the shell and opens a pipe to the process with the specified mode.
file | a string containing the pathname of a program to execute. | |
argv | a vector of argument strings passed to the new program. | |
mode | the I/O mode to use when opening the pipe. |
References IXE::io::pstream_common< CharT, Traits >::do_open(), and IXE::io::pstreams::pstdout.
void IXE::io::basic_ipstream< CharT, Traits >::open | ( | const std::string & | command, | |
pmode | mode = pstdout | |||
) | [inline] |
Start a process.
Starts a new process by passing command to the shell and opens a pipe to the process with the specified mode.
command | a string containing a shell command. | |
mode | the I/O mode to use when opening the pipe. |
References IXE::io::pstream_common< CharT, Traits >::do_open(), and IXE::io::pstreams::pstdout.
basic_ipstream& IXE::io::basic_ipstream< CharT, Traits >::out | ( | ) | [inline] |
Set streambuf to read from process' stdout
.
*this
References IXE::io::pstream_common< CharT, Traits >::buf_, and IXE::io::basic_pstreambuf< CharT, Traits >::read_err().