Tanl Linguistic Pipeline

IXE::io::basic_ipstream< CharT, Traits > Class Template Reference

Inheritance diagram for IXE::io::basic_ipstream< CharT, Traits >:
IXE::io::pstream_common< CharT, Traits > IXE::io::pstreams IXE::io::pstreams

List of all members.

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_ipstream ()
 Default constructor, creates an uninitialised stream.
 basic_ipstream (const std::string &command, pmode mode=pstdout)
 Constructor that initialises the stream by starting a process.
 basic_ipstream (const std::string &file, const argv_type &argv, pmode mode=pstdout)
 Constructor that initialises the stream by starting a process.
 ~basic_ipstream ()
 Destructor.
void open (const std::string &command, pmode mode=pstdout)
 Start a process.
void open (const std::string &file, const argv_type &argv, pmode mode=pstdout)
 Start a process.
basic_ipstreamout ()
 Set streambuf to read from process' stdout.
basic_ipstreamerr ()
 Set streambuf to read from process' stderr.

template<typename CharT, typename Traits = std::char_traits<CharT>>
class IXE::io::basic_ipstream< CharT, Traits >


Constructor & Destructor Documentation

template<typename CharT , typename Traits = std::char_traits<CharT>>
IXE::io::basic_ipstream< CharT, Traits >::basic_ipstream ( const std::string &  command,
pmode  mode = pstdout 
) [inline]

Constructor that initialises the stream by starting a process.

Initialises the stream buffer by calling do_open() with the supplied arguments.

Parameters:
command a string containing a shell command.
mode the I/O mode to use when opening the pipe.
See also:
do_open(const std::string&, pmode)
template<typename CharT , typename Traits = std::char_traits<CharT>>
IXE::io::basic_ipstream< CharT, Traits >::basic_ipstream ( const std::string &  file,
const argv_type argv,
pmode  mode = pstdout 
) [inline]

Constructor that initialises the stream by starting a process.

Initialises the stream buffer by calling do_open() with the supplied arguments.

Parameters:
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.
See also:
do_open(const std::string&, const argv_type&, pmode)
template<typename CharT , typename Traits = std::char_traits<CharT>>
IXE::io::basic_ipstream< CharT, Traits >::~basic_ipstream (  )  [inline]

Destructor.

Closes the stream and waits for the child to exit.


Member Function Documentation

template<typename CharT , typename Traits = std::char_traits<CharT>>
basic_ipstream& IXE::io::basic_ipstream< CharT, Traits >::err (  )  [inline]

Set streambuf to read from process' stderr.

Returns:
*this

References IXE::io::pstream_common< CharT, Traits >::buf_, and IXE::io::basic_pstreambuf< CharT, Traits >::read_err().

template<typename CharT , typename Traits = std::char_traits<CharT>>
void IXE::io::basic_ipstream< CharT, Traits >::open ( const std::string &  file,
const argv_type argv,
pmode  mode = pstdout 
) [inline]

Start a process.

Starts a new process by passing command to the shell and opens a pipe to the process with the specified mode.

Parameters:
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.
See also:
do_open(const std::string&, const argv_type&, pmode)

References IXE::io::pstream_common< CharT, Traits >::do_open(), and IXE::io::pstreams::pstdout.

template<typename CharT , typename Traits = std::char_traits<CharT>>
void IXE::io::basic_ipstream< CharT, Traits >::open ( const std::string &  command,
pmode  mode = pstdout 
) [inline]

Start a process.

Starts a new process by passing command to the shell and opens a pipe to the process with the specified mode.

Parameters:
command a string containing a shell command.
mode the I/O mode to use when opening the pipe.
See also:
do_open(const std::string&, pmode)

References IXE::io::pstream_common< CharT, Traits >::do_open(), and IXE::io::pstreams::pstdout.

template<typename CharT , typename Traits = std::char_traits<CharT>>
basic_ipstream& IXE::io::basic_ipstream< CharT, Traits >::out (  )  [inline]

Set streambuf to read from process' stdout.

Returns:
*this

References IXE::io::pstream_common< CharT, Traits >::buf_, and IXE::io::basic_pstreambuf< CharT, Traits >::read_err().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
 
Copyright © 2005-2011 G. Attardi. Generated on 4 Mar 2011 by doxygen 1.6.1.