Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  
Public Member Functions | Private Attributes

SgProcess Class Reference

Run a child process and provide access to its standard input and output streams. More...

#include <SgProcess.h>

List of all members.

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

Detailed Description

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.


Constructor & Destructor Documentation

SgProcess::SgProcess ( const std::string &  command  ) 

Constructor.

Exceptions:
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.


Member Function Documentation

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.


Member Data Documentation

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().


The documentation for this class was generated from the following files:


Sun Mar 13 2011 Doxygen 1.7.1