| 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_pstream () | |
| Default constructor, creates an uninitialised stream. | |
| basic_pstream (const std::string &command, pmode mode=pstdout|pstdin) | |
| Constructor that initialises the stream by starting a process. | |
| basic_pstream (const std::string &file, const argv_type &argv, pmode mode=pstdout|pstdin) | |
| Constructor that initialises the stream by starting a process. | |
| ~basic_pstream () | |
| 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. | |
| basic_pstream & | out () |
Set streambuf to read from process' stdout. | |
| basic_pstream & | err () |
Set streambuf to read from process' stderr. | |
| IXE::io::basic_pstream< CharT, Traits >::basic_pstream | ( | 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_pstream< CharT, Traits >::basic_pstream | ( | 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. |
| IXE::io::basic_pstream< CharT, Traits >::~basic_pstream | ( | ) | [inline] |
Destructor.
Closes the stream and waits for the child to exit.
| basic_pstream& IXE::io::basic_pstream< 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_pstream< CharT, Traits >::open | ( | const std::string & | file, | |
| const argv_type & | argv, | |||
| pmode | mode = pstdout|pstdin | |||
| ) | [inline] |
Start a process.
Calls do_open( file , argv , 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_pstream< CharT, Traits >::open | ( | const std::string & | command, | |
| pmode | mode = pstdout|pstdin | |||
| ) | [inline] |
Start a process.
Calls do_open( command , 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().
| basic_pstream& IXE::io::basic_pstream< 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().