OpenStudioCore:runmanager/lib
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Signals | Public Member Functions | Protected Member Functions | List of all members
openstudio::runmanager::Process Class Referenceabstract

#include <Process.hpp>

+ Inheritance diagram for openstudio::runmanager::Process:

Signals

void error (QProcess::ProcessError)
 Emitted if a process error occurs. More...
 
void error (QProcess::ProcessError, const std::string &description)
 Emitted if a process error occurs, with extra description of error. More...
 
void finished (int exitcode, QProcess::ExitStatus)
 Emitted after the process has finished. More...
 
void outputFileChanged (const openstudio::runmanager::FileInfo &file)
 Emitted after an output file has changed. More...
 
void standardErrDataAdded (const std::string &data)
 Emitted after stderr data has been created. More...
 
void standardOutDataAdded (const std::string &data)
 Emitted after stdout data has been created. More...
 
void started ()
 Emitted when the process is fully running. More...
 
void statusChanged (const openstudio::runmanager::AdvancedStatus &s)
 Emitted whenever the status changes. More...
 

Public Member Functions

virtual void cleanup (const std::vector< std::string > &t_files)=0
 Removes the vector of output file names passed in from the output directory. More...
 
virtual void cleanUpRequiredFiles ()=0
 Request that the process clean up files which were copied into the run directory because the were required to run the process but are no longer necessary now that the process has completed. More...
 
virtual std::vector< FileInfoinputFiles () const =0
 
virtual std::vector< FileInfooutputFiles () const =0
 
 Process ()
 
virtual bool running () const =0
 
virtual void start ()=0
 Requests that the process start. More...
 
openstudio::runmanager::AdvancedStatus status () const
 
void stop ()
 request that the process stop More...
 
bool stopped () const
 
virtual void waitForFinished ()=0
 Blocks until the process has finished. More...
 
virtual ~Process ()
 

Protected Member Functions

void emitOutputFileChanged (const openstudio::runmanager::FileInfo &file)
 Emit the outputFileChanged(const openstudio::runmanager::FileInfo&) signal. More...
 
void emitStatusChanged (const openstudio::runmanager::AdvancedStatus &status)
 Emit the statusChanged signal. More...
 

Detailed Description

Base class for local processes.

Constructor & Destructor Documentation

openstudio::runmanager::Process::Process ( )
virtual openstudio::runmanager::Process::~Process ( )
inlinevirtual

Member Function Documentation

virtual void openstudio::runmanager::Process::cleanup ( const std::vector< std::string > &  t_files)
pure virtual

Removes the vector of output file names passed in from the output directory.

virtual void openstudio::runmanager::Process::cleanUpRequiredFiles ( )
pure virtual

Request that the process clean up files which were copied into the run directory because the were required to run the process but are no longer necessary now that the process has completed.

void openstudio::runmanager::Process::emitOutputFileChanged ( const openstudio::runmanager::FileInfo file)
protected
void openstudio::runmanager::Process::emitStatusChanged ( const openstudio::runmanager::AdvancedStatus status)
protected

Emit the statusChanged signal.

void openstudio::runmanager::Process::error ( QProcess::ProcessError  )
signal

Emitted if a process error occurs.

void openstudio::runmanager::Process::error ( QProcess::ProcessError  ,
const std::string &  description 
)
signal

Emitted if a process error occurs, with extra description of error.

void openstudio::runmanager::Process::finished ( int  exitcode,
QProcess::ExitStatus   
)
signal

Emitted after the process has finished.

virtual std::vector<FileInfo> openstudio::runmanager::Process::inputFiles ( ) const
pure virtual
Returns
the vector of input files used by the Process.
void openstudio::runmanager::Process::outputFileChanged ( const openstudio::runmanager::FileInfo file)
signal

Emitted after an output file has changed.

virtual std::vector<FileInfo> openstudio::runmanager::Process::outputFiles ( ) const
pure virtual
Returns
the vector of outputFiles generated by the process
virtual bool openstudio::runmanager::Process::running ( ) const
pure virtual
Returns
true if the process is running or starting up
void openstudio::runmanager::Process::standardErrDataAdded ( const std::string &  data)
signal

Emitted after stderr data has been created.

void openstudio::runmanager::Process::standardOutDataAdded ( const std::string &  data)
signal

Emitted after stdout data has been created.

virtual void openstudio::runmanager::Process::start ( )
pure virtual

Requests that the process start.

void openstudio::runmanager::Process::started ( )
signal

Emitted when the process is fully running.

openstudio::runmanager::AdvancedStatus openstudio::runmanager::Process::status ( ) const
Returns
the current status of the Process
void openstudio::runmanager::Process::statusChanged ( const openstudio::runmanager::AdvancedStatus s)
signal

Emitted whenever the status changes.

void openstudio::runmanager::Process::stop ( )

request that the process stop

bool openstudio::runmanager::Process::stopped ( ) const
Returns
True if stop() has been called;
virtual void openstudio::runmanager::Process::waitForFinished ( )
pure virtual

Blocks until the process has finished.