merge 31
authorAleš Křenek <ljocha@ics.muni.cz>
Tue, 16 Oct 2007 17:19:05 +0000 (17:19 +0000)
committerAleš Křenek <ljocha@ics.muni.cz>
Tue, 16 Oct 2007 17:19:05 +0000 (17:19 +0000)
org.glite.lb.client/interface/JobStatus.h.T
org.glite.lb.client/interface/ServerConnection.h

index 7776068..ab7dca7 100644 (file)
@@ -59,6 +59,13 @@ public:
         */
        enum Attr {
 @@@{
+       require '../src/StatusAttrNames.pl';
+       my %StatusAttrNums;
+       my $stno = 0;
+       for (@main::StatusAttrNames) {
+               $StatusAttrNums{$_} = $stno++;
+       }
+
        selectType $status '_common_';
        for my $u (sort {$a cmp $b} getAllFields $status) {
                selectField $status $u;
@@ -66,7 +73,9 @@ public:
                $u =~ s/([a-z])([A-Z])/$1_$2/g;
                $u = uc $u;
 
-               gen "\t/** $f->{comment} */\n\t\t$u,\n";
+               gen defined($StatusAttrNums{$u}) ? 
+                       "\t/** $f->{comment} */\n\t\t$u = $StatusAttrNums{$u},\n" :
+                       "#error \"$u not defined in StatusAttrNames\"\n";
        }
 @@@}
                 ATTR_MAX /**< Limit for range checking. */
index 24ecdf5..a55ee5e 100644 (file)
@@ -41,23 +41,24 @@ public:
         */
        enum Attr {
                UNDEF=0,        /**< Not-defined value, used to terminate lists etc. */
-               JOBID,          /**< Job id. */
-               OWNER,          /**< Job owner (certificate subject). */
-               STATUS,         /**< Current job status code. */
-               LOCATION,       /**< Where is the job being processed. */
-               DESTINATION,    /**< Destination CE. */
-               DONECODE,       /**< Minor done status (OK,fail,cancel). */
-               USERTAG,        /**< User tag. */
-               TIME,           /**< Timestamp of the event. */
-               LEVEL,          /**< Logging level. */
-               HOST,           /**< Hostname where the event was generated. */
-               SOURCE,         /**< Source component that sent the event. */
-               INSTANCE,       /**< Instance of the source component. */
-               EVENT_TYPE,     /**< Event type. */
-               CHKPT_TAG,      /**< Checkpoint tag. */
-               RESUBMITTED,    /**< Job was resubmitted */
-               PARENT,         /**< Id of the parent job. */
-               EXITCODE,       /**< Job system exit code. */
+               JOBID = EDG_WLL_QUERY_ATTR_JOBID,               /**< Job id. */
+               OWNER = EDG_WLL_QUERY_ATTR_OWNER,               /**< Job owner (certificate subject). */
+               STATUS = EDG_WLL_QUERY_ATTR_STATUS,             /**< Current job status code. */
+               LOCATION = EDG_WLL_QUERY_ATTR_LOCATION, /**< Where is the job being processed. */
+               DESTINATION = EDG_WLL_QUERY_ATTR_DESTINATION,   /**< Destination CE. */
+               DONECODE = EDG_WLL_QUERY_ATTR_DONECODE, /**< Minor done status (OK,fail,cancel). */
+               USERTAG = EDG_WLL_QUERY_ATTR_USERTAG,   /**< User tag. */
+               TIME = EDG_WLL_QUERY_ATTR_TIME,         /**< Timestamp of the event. */
+               LEVEL = EDG_WLL_QUERY_ATTR_LEVEL,               /**< Logging level. */
+               HOST = EDG_WLL_QUERY_ATTR_HOST,         /**< Hostname where the event was generated. */
+               SOURCE = EDG_WLL_QUERY_ATTR_SOURCE,             /**< Source component that sent the event. */
+               INSTANCE = EDG_WLL_QUERY_ATTR_INSTANCE, /**< Instance of the source component. */
+               EVENT_TYPE = EDG_WLL_QUERY_ATTR_EVENT_TYPE,     /**< Event type. */
+               CHKPT = EDG_WLL_QUERY_ATTR_CHKPT_TAG,   /**< Checkpoint tag. */
+               RESUBMITTED = EDG_WLL_QUERY_ATTR_RESUBMITTED,   /**< Job was resubmitted */
+               PARENT = EDG_WLL_QUERY_ATTR_PARENT,             /**< Id of the parent job. */
+               EXITCODE = EDG_WLL_QUERY_ATTR_EXITCODE, /**< Job system exit code. */
+               JDL_ATTR = EDG_WLL_QUERY_ATTR_JDL_ATTR,                 /**< Arbitrary JDL attribute */
        };
 
        /** Symbolic names of predicates.