votca 2024.2-dev
Loading...
Searching...
No Matches
votca::xtp::Job Class Reference

#include <job.h>

Collaboration diagram for votca::xtp::Job:

Classes

class  JobResult
 

Public Types

enum  JobStatus { AVAILABLE , ASSIGNED , FAILED , COMPLETE }
 

Public Member Functions

 Job (const tools::Property &prop)
 
 Job (Index id, const std::string &tag, const tools::Property &input, JobStatus status)
 
std::string ConvertStatus (JobStatus) const
 
JobStatus ConvertStatus (std::string) const
 
void Reset ()
 
void ToStream (std::ofstream &ofs) const
 
void UpdateFrom (const Job &ext)
 
void UpdateFromResult (const JobResult &res)
 
Index getId () const
 
std::string getTag () const
 
tools::PropertygetInput ()
 
const tools::PropertygetInput () const
 
const JobStatusgetStatus () const
 
std::string getStatusStr () const
 
bool hasHost () const
 
bool hasTime () const
 
bool hasOutput () const
 
bool hasError () const
 
bool isAvailable () const
 
bool isAssigned () const
 
bool isFailed () const
 
bool isComplete () const
 
bool isFresh () const
 
void setStatus (JobStatus stat)
 
void setStatus (std::string stat)
 
void setTime (std::string time)
 
void setHost (std::string host)
 
void setOutput (std::string output)
 
const std::string & getHost () const
 
const std::string & getTime () const
 
const tools::PropertygetOutput () const
 
const std::string & getError () const
 

Private Attributes

Index id_
 
std::string tag_
 
JobStatus status_
 
Index attemptsCount_ = 0
 
tools::Property input_
 
std::string host_
 
bool has_host_ = false
 
std::string time_
 
bool has_time_ = false
 
tools::Property output_
 
bool has_error_ = false
 
bool has_output_ = false
 
std::string error_
 

Detailed Description

Definition at line 35 of file job.h.

Member Enumeration Documentation

◆ JobStatus

Enumerator
AVAILABLE 
ASSIGNED 
FAILED 
COMPLETE 

Definition at line 38 of file job.h.

Constructor & Destructor Documentation

◆ Job() [1/2]

votca::xtp::Job::Job ( const tools::Property & prop)

Definition at line 35 of file job.cc.

◆ Job() [2/2]

votca::xtp::Job::Job ( Index id,
const std::string & tag,
const tools::Property & input,
JobStatus status )

Definition at line 66 of file job.cc.

Member Function Documentation

◆ ConvertStatus() [1/2]

std::string votca::xtp::Job::ConvertStatus ( JobStatus status) const

Definition at line 75 of file job.cc.

◆ ConvertStatus() [2/2]

Job::JobStatus votca::xtp::Job::ConvertStatus ( std::string status) const

Definition at line 97 of file job.cc.

◆ getError()

const std::string & votca::xtp::Job::getError ( ) const
inline

Definition at line 130 of file job.h.

◆ getHost()

const std::string & votca::xtp::Job::getHost ( ) const
inline

Definition at line 118 of file job.h.

◆ getId()

Index votca::xtp::Job::getId ( ) const
inline

Definition at line 85 of file job.h.

◆ getInput() [1/2]

tools::Property & votca::xtp::Job::getInput ( )
inline

Definition at line 87 of file job.h.

◆ getInput() [2/2]

const tools::Property & votca::xtp::Job::getInput ( ) const
inline

Definition at line 88 of file job.h.

◆ getOutput()

const tools::Property & votca::xtp::Job::getOutput ( ) const
inline

Definition at line 126 of file job.h.

◆ getStatus()

const JobStatus & votca::xtp::Job::getStatus ( ) const
inline

Definition at line 89 of file job.h.

◆ getStatusStr()

std::string votca::xtp::Job::getStatusStr ( ) const
inline

Definition at line 90 of file job.h.

◆ getTag()

std::string votca::xtp::Job::getTag ( ) const
inline

Definition at line 86 of file job.h.

◆ getTime()

const std::string & votca::xtp::Job::getTime ( ) const
inline

Definition at line 122 of file job.h.

◆ hasError()

bool votca::xtp::Job::hasError ( ) const
inline

Definition at line 95 of file job.h.

◆ hasHost()

bool votca::xtp::Job::hasHost ( ) const
inline

Definition at line 92 of file job.h.

◆ hasOutput()

bool votca::xtp::Job::hasOutput ( ) const
inline

Definition at line 94 of file job.h.

◆ hasTime()

bool votca::xtp::Job::hasTime ( ) const
inline

Definition at line 93 of file job.h.

◆ isAssigned()

bool votca::xtp::Job::isAssigned ( ) const
inline

Definition at line 98 of file job.h.

◆ isAvailable()

bool votca::xtp::Job::isAvailable ( ) const
inline

Definition at line 97 of file job.h.

◆ isComplete()

bool votca::xtp::Job::isComplete ( ) const
inline

Definition at line 100 of file job.h.

◆ isFailed()

bool votca::xtp::Job::isFailed ( ) const
inline

Definition at line 99 of file job.h.

◆ isFresh()

bool votca::xtp::Job::isFresh ( ) const
inline

Definition at line 101 of file job.h.

◆ Reset()

void votca::xtp::Job::Reset ( )

Definition at line 113 of file job.cc.

◆ setHost()

void votca::xtp::Job::setHost ( std::string host)
inline

Definition at line 109 of file job.h.

◆ setOutput()

void votca::xtp::Job::setOutput ( std::string output)
inline

Definition at line 113 of file job.h.

◆ setStatus() [1/2]

void votca::xtp::Job::setStatus ( JobStatus stat)
inline

Definition at line 103 of file job.h.

◆ setStatus() [2/2]

void votca::xtp::Job::setStatus ( std::string stat)
inline

Definition at line 104 of file job.h.

◆ setTime()

void votca::xtp::Job::setTime ( std::string time)
inline

Definition at line 105 of file job.h.

◆ ToStream()

void votca::xtp::Job::ToStream ( std::ofstream & ofs) const

Definition at line 121 of file job.cc.

◆ UpdateFrom()

void votca::xtp::Job::UpdateFrom ( const Job & ext)

Definition at line 149 of file job.cc.

◆ UpdateFromResult()

void votca::xtp::Job::UpdateFromResult ( const JobResult & res)

Definition at line 170 of file job.cc.

Member Data Documentation

◆ attemptsCount_

Index votca::xtp::Job::attemptsCount_ = 0
private

Definition at line 140 of file job.h.

◆ error_

std::string votca::xtp::Job::error_
private

Definition at line 151 of file job.h.

◆ has_error_

bool votca::xtp::Job::has_error_ = false
private

Definition at line 149 of file job.h.

◆ has_host_

bool votca::xtp::Job::has_host_ = false
private

Definition at line 145 of file job.h.

◆ has_output_

bool votca::xtp::Job::has_output_ = false
private

Definition at line 150 of file job.h.

◆ has_time_

bool votca::xtp::Job::has_time_ = false
private

Definition at line 147 of file job.h.

◆ host_

std::string votca::xtp::Job::host_
private

Definition at line 144 of file job.h.

◆ id_

Index votca::xtp::Job::id_
private

Definition at line 137 of file job.h.

◆ input_

tools::Property votca::xtp::Job::input_
private

Definition at line 141 of file job.h.

◆ output_

tools::Property votca::xtp::Job::output_
private

Definition at line 148 of file job.h.

◆ status_

JobStatus votca::xtp::Job::status_
private

Definition at line 139 of file job.h.

◆ tag_

std::string votca::xtp::Job::tag_
private

Definition at line 138 of file job.h.

◆ time_

std::string votca::xtp::Job::time_
private

Definition at line 146 of file job.h.


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