Run a child process and provide access to its standard input and output streams. More...
#include <SgProcess.h>
Public Member Functions | |
SgProcess (const std::string &command) | |
Constructor. | |
~SgProcess () | |
std::istream & | Input () |
std::ostream & | Output () |
Private Attributes | |
std::auto_ptr < __gnu_cxx::stdio_filebuf < char > > | m_bufIn |
std::auto_ptr < __gnu_cxx::stdio_filebuf < char > > | m_bufOut |
std::auto_ptr< std::istream > | m_in |
std::auto_ptr< std::ostream > | m_out |
Run a child process and provide access to its standard input and output streams.
The implementation of this class is platform-dependent. Currently, only POSIX systems are supported (it also uses GCC-specific extensions to open C++ streams from file descriptors).
Definition at line 22 of file SgProcess.h.
SgProcess::SgProcess | ( | const std::string & | command | ) |
Constructor.
SgException | on failure |
Definition at line 54 of file SgProcess.cpp.
References m_bufIn, m_bufOut, m_in, m_out, and SgStringUtil::SplitArguments().
SgProcess::~SgProcess | ( | ) |
Definition at line 110 of file SgProcess.cpp.
std::istream & SgProcess::Input | ( | ) |
Definition at line 45 of file SgProcess.h.
References m_in.
std::ostream & SgProcess::Output | ( | ) |
Definition at line 50 of file SgProcess.h.
References m_out.
std::auto_ptr<__gnu_cxx::stdio_filebuf<char> > SgProcess::m_bufIn [private] |
Definition at line 36 of file SgProcess.h.
Referenced by SgProcess().
std::auto_ptr<__gnu_cxx::stdio_filebuf<char> > SgProcess::m_bufOut [private] |
Definition at line 38 of file SgProcess.h.
Referenced by SgProcess().
std::auto_ptr<std::istream> SgProcess::m_in [private] |
Definition at line 40 of file SgProcess.h.
Referenced by Input(), and SgProcess().
std::auto_ptr<std::ostream> SgProcess::m_out [private] |
Definition at line 42 of file SgProcess.h.
Referenced by Output(), and SgProcess().