#include <pstream.h>
Inheritance diagram for redi::pstream_common< CharT, Traits >:

Public Types | |
| typedef std::ios_base::openmode | pmode |
| Type used to specify how to connect to the process. | |
| typedef std::vector< std::string > | argv_type |
| Type used to hold the arguments for a command. | |
| typedef int | fd_type |
| Type used for file descriptors. | |
Public Member Functions | |
| void | close () |
| Close the pipe. | |
| bool | is_open () const |
| Report whether the stream's buffer has been initialised. | |
| const std::string & | command () const |
| Return the command used to initialise the stream. | |
| streambuf_type * | rdbuf () const |
| Return a pointer to the stream buffer. | |
Static Public Attributes | |
| static const pmode | pstdin = std::ios_base::out |
| Write to stdin. | |
| static const pmode | pstdout = std::ios_base::in |
| Read from stdout. | |
| static const pmode | pstderr = std::ios_base::app |
| Read from stderr. | |
Protected Types | |
|
typedef basic_pstreambuf< CharT, Traits > | streambuf_type |
| enum | { bufsz = 32 } |
| enum | { pbsz = 2 } |
Protected Member Functions | |
| pstream_common () | |
| Default constructor. | |
| pstream_common (const std::string &command, pmode mode) | |
| Constructor that initialises the stream by starting a process. | |
| pstream_common (const std::string &file, const argv_type &argv, pmode mode) | |
| Constructor that initialises the stream by starting a process. | |
| virtual | ~pstream_common ()=0 |
| Pure virtual destructor. | |
| void | do_open (const std::string &command, pmode mode) |
| Start a process. | |
| void | do_open (const std::string &file, const argv_type &argv, pmode mode) |
| Start a process. | |
Protected Attributes | |
| std::string | command_ |
| The command used to start the process. | |
| streambuf_type | buf_ |
| The stream buffer. | |
Abstract Base Class providing common functionality for basic_ipstream, basic_opstream and basic_pstream. pstream_common manages the basic_pstreambuf stream buffer that is used by the derived classes to initialise an IOStream class.
|
|||||||||
|
Default constructor. Creates an uninitialised stream. |
|
||||||||||||||||
|
Constructor that initialises the stream by starting a process. Initialises the stream buffer by calling do_open( command , mode )
|
|
||||||||||||||||||||
|
Constructor that initialises the stream by starting a process. Initialises the stream buffer by calling do_open( file , argv , mode )
|
|
|||||||||
|
Pure virtual destructor.
This is a pure virtual function to make
|
|
|||||||||
|
Close the pipe.
Calls rdbuf->close() and sets |
|
|||||||||
|
Return the command used to initialise the stream.
|
|
||||||||||||||||||||
|
Start a process.
Calls rdbuf()->open( file, argv, mode ) and sets
|
|
||||||||||||||||
|
Start a process.
Calls rdbuf()->open( command , mode ) and sets
|
|
|||||||||
|
Report whether the stream's buffer has been initialised.
|
|
|||||||||
|
Return a pointer to the stream buffer.
|
1.4.3-20050530