Back to index

nordugrid-arc-nox  1.1.0~rc6
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes
Arc::JobStateARC1 Class Reference

#include <JobStateARC1.h>

Inheritance diagram for Arc::JobStateARC1:
Inheritance graph
[legend]
Collaboration diagram for Arc::JobStateARC1:
Collaboration graph
[legend]

List of all members.

Public Types

enum  StateType { JOBSTATE_TABLE }

Public Member Functions

 JobStateARC1 (const std::string &state)
 operator bool () const
bool operator! () const
bool operator== (const StateType &st) const
bool operator!= (const StateType &st) const
bool IsFinished () const
std::string operator() () const
std::string GetGeneralState () const

Static Public Member Functions

static JobState::StateType StateMap (const std::string &state)

Static Public Attributes

static const std::string StateTypeString [] = { JOBSTATE_TABLE }

Detailed Description

Definition at line 8 of file JobStateARC1.h.


Member Enumeration Documentation

enum Arc::JobState::StateType [inherited]
Enumerator:
JOBSTATE_TABLE 

Definition at line 48 of file JobState.h.


Constructor & Destructor Documentation

Arc::JobStateARC1::JobStateARC1 ( const std::string &  state) [inline]

Definition at line 11 of file JobStateARC1.h.


Member Function Documentation

std::string Arc::JobState::GetGeneralState ( ) const [inline, inherited]

Definition at line 65 of file JobState.h.

{ return StateTypeString[type]; }

Here is the caller graph for this function:

bool Arc::JobState::IsFinished ( ) const [inline, inherited]

Definition at line 61 of file JobState.h.

{ return type == FINISHED || type == KILLED || type == FAILED || type == DELETED; }
Arc::JobState::operator bool ( void  ) const [inline, inherited]

Definition at line 56 of file JobState.h.

{ return type != UNDEFINED; }
bool Arc::JobState::operator! ( void  ) const [inline, inherited]

Definition at line 57 of file JobState.h.

{ return type == UNDEFINED; }
bool Arc::JobState::operator!= ( const StateType st) const [inline, inherited]

Definition at line 59 of file JobState.h.

{ return type != st; }
std::string Arc::JobState::operator() ( ) const [inline, inherited]

Definition at line 63 of file JobState.h.

{ return state; }
bool Arc::JobState::operator== ( const StateType st) const [inline, inherited]

Definition at line 58 of file JobState.h.

{ return type == st; }
JobState::StateType Arc::JobStateARC1::StateMap ( const std::string &  state) [static]

Definition at line 11 of file JobStateARC1.cpp.

                                                                 {
    std::string state_ = Arc::lower(state);
    std::string::size_type p = state_.find("pending:");
    if(p != std::string::npos) {
      state_.erase(p,8);
    }
    if (state_ == "accepted")
      return JobState::ACCEPTED;
    else if (state_ == "preparing" ||
             state_ == "prepared")    // obtained through BES
      return JobState::PREPARING;
    else if (state_ == "submit" ||
             state_ == "submitting")  // obtained through BES
      return JobState::SUBMITTING;
    else if (state_ == "inlrms:q")
      return JobState::QUEUING;
    else if (state_ == "inlrms:r" ||
             state_ == "inlrms:executed" ||
             state_ == "inlrms:s" ||
             state_ == "inlrms:e" ||
             state_ == "executing" || // obtained through BES
             state_ == "executed" ||  // obtained through BES
             state_ == "killing")     // obtained through BES
      return JobState::RUNNING;
    else if (state_ == "finishing")
      return JobState::FINISHING;
    else if (state_ == "finished")
      return JobState::FINISHED;
    else if (state_ == "killed")
      return JobState::KILLED;
    else if (state_ == "failed")
      return JobState::FAILED;
    else if (state_ == "deleted")
      return JobState::DELETED;
    else if (state_ == "")
      return JobState::UNDEFINED;
    else
      return JobState::OTHER;
  }

Here is the call graph for this function:


Member Data Documentation

const std::string Arc::JobState::StateTypeString = { JOBSTATE_TABLE } [static, inherited]

Definition at line 50 of file JobState.h.


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