dlvhex  2.5.0
Process Class Reference

Base class for solver processes. More...

#include <include/dlvhex2/Process.h>

Inheritance diagram for Process:

Public Member Functions

virtual ~Process ()
 Destructor.
virtual void addOption (const std::string &o)=0
 Adds an option to the commandline.
virtual std::string path () const =0
 Returns the executable command.
virtual std::vector< std::string > commandline () const =0
 Returns the whole reasoner commandline call.
virtual void spawn ()=0
 Instantiates a new process spawned from this one.
virtual void spawn (const std::vector< std::string > &c)=0
 Instantiates a new process spawned from this one using a given commandline string.
virtual void endoffile ()=0
 Sends EOF to the process.
virtual int close (bool kill=false)=0
 Waits for the process to terminate.
virtual std::ostream & getOutput ()=0
 Retrieve the output stream of the process.
virtual std::istream & getInput ()=0
 Retrieve the input stream of the process.

Detailed Description

Base class for solver processes.

Definition at line 50 of file Process.h.


Constructor & Destructor Documentation

virtual Process::~Process ( ) [inline, virtual]

Destructor.

Definition at line 55 of file Process.h.


Member Function Documentation

virtual void Process::addOption ( const std::string &  o) [pure virtual]

Adds an option to the commandline.

Returns:
o Option to add.

Implemented in DLVProcess.

virtual int Process::close ( bool  kill = false) [pure virtual]

Waits for the process to terminate.

Parameters:
killIf true the child process will be killed, otherwise the method waits.
Returns:
Return code of the process.

Implemented in DLVProcess.

virtual std::vector<std::string> Process::commandline ( ) const [pure virtual]

Returns the whole reasoner commandline call.

Returns:
Command separated into executable and options.

Implemented in DLVProcess.

virtual void Process::endoffile ( ) [pure virtual]

Sends EOF to the process.

Implemented in DLVProcess.

virtual std::istream& Process::getInput ( ) [pure virtual]

Retrieve the input stream of the process.

Returns:
Input stream.

Implemented in DLVProcess.

virtual std::ostream& Process::getOutput ( ) [pure virtual]

Retrieve the output stream of the process.

Returns:
Output stream.

Implemented in DLVProcess.

virtual std::string Process::path ( ) const [pure virtual]

Returns the executable command.

Returns:
Reasoner executable command.

Implemented in DLVProcess.

virtual void Process::spawn ( ) [pure virtual]

Instantiates a new process spawned from this one.

Implemented in DLVProcess.

virtual void Process::spawn ( const std::vector< std::string > &  c) [pure virtual]

Instantiates a new process spawned from this one using a given commandline string.

Parameters:
Commandlineexecuted by the new process.

Implemented in DLVProcess.


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