00001 #ifndef _ots_SOAPCommand_h
00002 #define _ots_SOAPCommand_h
00003
00004 #include "otsdaq-core/SOAPUtilities/SOAPParameter.h"
00005 #include "otsdaq-core/SOAPUtilities/SOAPParameters.h"
00006
00007 #include <xoap/MessageReference.h>
00008
00009 #include <string>
00010 #include <ostream>
00011
00012 namespace ots
00013 {
00014
00015 class SOAPCommand
00016 {
00017 public:
00018
00019 SOAPCommand (void);
00020 SOAPCommand (const xoap::MessageReference& message);
00021 SOAPCommand (std::string command);
00022 SOAPCommand (std::string command, SOAPParameters parameters);
00023 SOAPCommand (std::string command, SOAPParameter parameter);
00024 ~SOAPCommand(void);
00025
00026
00027
00028 const std::string& getCommand (void) const;
00029 const SOAPParameters& getParameters (void) const;
00030 SOAPParameters& getParametersRef (void);
00031 std::string getParameterValue (std::string parameterName) const;
00032 unsigned int getParametersSize (void) const;
00033
00034
00035 void translate (const xoap::MessageReference& message);
00036 void setCommand (const std::string command);
00037 void setParameters (const SOAPParameters& parameters);
00038 void setParameter (const std::string parameterName, const std::string parameterValue);
00039 void setParameter (const SOAPParameter parameter);
00040
00041 bool hasParameters (void) const;
00042 bool findParameter (std::string parameterName) const;
00043 friend std::ostream& operator<<(std::ostream& os, const SOAPCommand& command);
00044
00045 private:
00046 std::string command_;
00047 SOAPParameters parameters_;
00048 };
00049
00050
00051 }
00052 #endif