| 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_rpstream () | |
| Default constructor, creates an uninitialised stream. | |
| basic_rpstream (const std::string &command, pmode mode=pstdout|pstdin) | |
| Constructor that initialises the stream by starting a process. | |
| basic_rpstream (const std::string &file, const argv_type &argv, pmode mode=pstdout|pstdin) | |
| Constructor that initialises the stream by starting a process. | |
| ~basic_rpstream () | |
| Destructor. | |
| void | open (const std::string &command, pmode mode=pstdout|pstdin) |
| Start a process. | |
| void | open (const std::string &file, const argv_type &argv, pmode mode=pstdout|pstdin) |
| Start a process. | |
| istream_type & | out () |
Obtain a reference to the istream that reads the process' stdout. | |
| istream_type & | err () |
Obtain a reference to the istream that reads the process' stderr. | |
| IXE::io::basic_rpstream< CharT, Traits >::basic_rpstream | ( | const std::string & | command, | |
| pmode | mode = pstdout|pstdin | |||
| ) | [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_rpstream< CharT, Traits >::basic_rpstream | ( | const std::string & | file, | |
| const argv_type & | argv, | |||
| pmode | mode = pstdout|pstdin | |||
| ) | [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. |
| istream_type& IXE::io::basic_rpstream< CharT, Traits >::err | ( | ) | [inline] |
Obtain a reference to the istream that reads the process' stderr.
*this References IXE::io::pstream_common< CharT, Traits >::buf_, and IXE::io::basic_pstreambuf< CharT, Traits >::read_err().
| void IXE::io::basic_rpstream< CharT, Traits >::open | ( | const std::string & | file, | |
| const argv_type & | argv, | |||
| pmode | mode = pstdout|pstdin | |||
| ) | [inline] |
Start a process.
Starts a new process by executing file with the arguments in argv and opens pipes to the process as given by 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().
| void IXE::io::basic_rpstream< CharT, Traits >::open | ( | const std::string & | command, | |
| pmode | mode = pstdout|pstdin | |||
| ) | [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().
| istream_type& IXE::io::basic_rpstream< CharT, Traits >::out | ( | ) | [inline] |
Obtain a reference to the istream that reads the process' stdout.
*this References IXE::io::pstream_common< CharT, Traits >::buf_, and IXE::io::basic_pstreambuf< CharT, Traits >::read_err().