]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - SHUTTLE/AliDCSMessage.h
EffC++ warnings corrected.
[u/mrichter/AliRoot.git] / SHUTTLE / AliDCSMessage.h
index ef600539c6c1745b2b01f03c55970436d6645243..ddede02161cd8bdbb7093e4e727d44943f1b056f 100644 (file)
@@ -9,13 +9,12 @@
 //
 // This class is a wrapper of AliDCSMessage.
 // These are the messages which form AliDCSProtocol.
+// Used by AliDCSClient to communicate with the DCS Amanda server
 //
 
-
-#include "AliDCSValue.h"
-
 #include <TString.h>
-#include <TList.h>
+#include <TObjArray.h>
+#include "AliDCSValue.h"
 
 #define HEADER_SIZE 8
 #define ID_OFFSET 0
@@ -41,8 +40,6 @@
 #define ERROR_CODE_OFFSET HEADER_SIZE
 #define ERROR_STRING_OFFSET (HEADER_SIZE + 1)
 
-
-
 class AliDCSMessage: public TObject {
 public:
        enum Type {
@@ -76,7 +73,7 @@ public:
 
         AliDCSMessage(const char* buffer, UInt_t size);
 
-        ~AliDCSMessage();
+        virtual ~AliDCSMessage();
 
 
         void CreateRequestMessage(RequestType type, 
@@ -87,7 +84,7 @@ public:
 
         void CreateCountMessage(UInt_t count);
 
-        void CreateResultSetMessage(AliSimpleValue::Type type); 
+        void CreateResultSetMessage(AliDCSValue::Type type);
 
         void CreateErrorMessage(ErrorCode code, const char* errorString);
        
@@ -127,7 +124,7 @@ public:
         TString GetRequestString() const;
 
         // MultiRequestType Message getters and setters
-        void GetRequestStrings(TList& result) const;
+        void GetRequestStrings(TObjArray& result) const;
 
         Bool_t AddRequestString(const char* request);
 
@@ -137,11 +134,11 @@ public:
         UInt_t GetCount() const;
 
         // ResultSetType Message getters ans setters       
-        AliSimpleValue::Type GetSimpleValueType() const;
+        AliDCSValue::Type GetValueType() const;
 
         UInt_t GetValueCount() const;
 
-        UInt_t GetValues(TList& result) const;
+        UInt_t GetValues(TObjArray& result) const;
 
         Bool_t AddValue(const AliDCSValue& value);
 
@@ -159,37 +156,42 @@ public:
 
 private:
 
-       char* fMessage;
+       AliDCSMessage(const AliDCSMessage& other);      
+       AliDCSMessage& operator= (const AliDCSMessage& other);  
+
+
+       char* fMessage;         // Array of bytes building the message
 
-       UInt_t fMessageSize;
+       UInt_t fMessageSize;    // Size of the message array
 
 
-       Type fType;
+       Type fType;             // Message type (request, count...)
        
        //Request message fields
-       RequestType fRequestType;
+       RequestType fRequestType;       // Type of request message
        
-       UInt_t fStartTime;
+       UInt_t fStartTime;              // Start time of query
 
-       UInt_t fEndTime;
+       UInt_t fEndTime;                // End time of query
 
-       TString fRequestString;
+       TString fRequestString;         // Request string
        
        //Count message fields
-       UInt_t fCount;
+       UInt_t fCount;                  // count counter
 
        //ResultSet message fields
-       AliSimpleValue::Type fSimpleValueType;
+       AliDCSValue::Type fValueType; // Simple value type
 
-       TList fValues;
+  // TODO this has to be a pointer
+       TObjArray fValues;              // array of received values
        
        //Error message fields
-       ErrorCode fErrorCode;
+       ErrorCode fErrorCode;           // error code
        
-       TString fErrorString;
+       TString fErrorString;           // error string
 
        //MultiRequest message fields
-       TList fRequestStrings; 
+       TObjArray fRequestStrings;      // multi request string array
 
        
        // Message setter helpers