Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

SgProcess Class Reference

#include <SgProcess.h>

List of all members.


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 20 of file 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


Constructor & Destructor Documentation

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

Constructor.

Exceptions:
SgException on failure

Definition at line 52 of file SgProcess.cpp.

References CreateFileBuf(), m_bufIn, m_bufOut, m_in, m_out, SgStringUtil::SplitArguments(), and TerminateChild().

SgProcess::~SgProcess (  ) 

Definition at line 108 of file SgProcess.cpp.


Member Function Documentation

std::istream & SgProcess::Input (  ) 

Definition at line 44 of file SgProcess.h.

References m_in.

std::ostream & SgProcess::Output (  ) 

Definition at line 49 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 35 of file SgProcess.h.

Referenced by SgProcess().

std::auto_ptr<__gnu_cxx::stdio_filebuf<char> > SgProcess::m_bufOut [private]

Definition at line 37 of file SgProcess.h.

Referenced by SgProcess().

std::auto_ptr<std::istream> SgProcess::m_in [private]

Definition at line 39 of file SgProcess.h.

Referenced by Input(), and SgProcess().

std::auto_ptr<std::ostream> SgProcess::m_out [private]

Definition at line 41 of file SgProcess.h.

Referenced by Output(), and SgProcess().


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


17 Jun 2010 Doxygen 1.4.7