Back to index

nordugrid-arc-nox  1.1.0~rc6
job_state.h
Go to the documentation of this file.
00001 #ifndef __AREX2_JOB_STATE_H__
00002 #define __AREX2_JOB_STATE_H__
00003 
00004 #include <string>
00005 
00006 namespace ARex2 
00007 {
00008 
00009 // Job States
00010 typedef enum {
00011   JOB_STATE_ACCEPTED   = 0,
00012   JOB_STATE_PREPARING  = 1,
00013   JOB_STATE_SUBMITTING = 2,
00014   JOB_STATE_INLRMS     = 3,
00015   JOB_STATE_FINISHING  = 4,
00016   JOB_STATE_FINISHED   = 5,
00017   JOB_STATE_DELETED    = 6,
00018   JOB_STATE_CANCELING  = 7,
00019   JOB_STATE_UNDEFINED  = 8
00020 } job_state_t;
00021 
00023 class JobState
00024 {
00025     protected:
00026         job_state_t state;
00027         /* explanation of job's failure */
00028         std::string failure_reason;
00029     public:
00030         JobState(job_state_t s);
00031         ~JobState(void);
00032         const std::string &GetFailure(void) { return failure_reason; };
00033 
00034 };
00035 
00036 } // namespace ARex2
00037 
00038 #endif
00039