otsdaq  v2_00_00
SOAPCommand.h
1 #ifndef _ots_SOAPCommand_h
2 #define _ots_SOAPCommand_h
3 
4 #include "otsdaq-core/SOAPUtilities/SOAPParameter.h"
5 #include "otsdaq-core/SOAPUtilities/SOAPParameters.h"
6 
7 #include <xoap/MessageReference.h>
8 
9 #include <string>
10 #include <ostream>
11 
12 namespace ots
13 {
14 
16 {
17 public:
18 
19  SOAPCommand (void);
20  SOAPCommand (const xoap::MessageReference& message);
21  SOAPCommand (std::string command);
22  SOAPCommand (std::string command, SOAPParameters parameters);
23  SOAPCommand (std::string command, SOAPParameter parameter);
24  ~SOAPCommand(void);
25 
26  //Getters
27  //FIXMEconst xoap::MessageReference translate (void) const;
28  const std::string& getCommand (void) const;
29  const SOAPParameters& getParameters (void) const;
30  SOAPParameters& getParametersRef (void);
31  std::string getParameterValue (std::string parameterName) const;
32  unsigned int getParametersSize (void) const;
33 
34  //Setters
35  void translate (const xoap::MessageReference& message);
36  void setCommand (const std::string command);
37  void setParameters (const SOAPParameters& parameters);
38  void setParameter (const std::string parameterName, const std::string parameterValue);
39  void setParameter (const SOAPParameter parameter);
40 
41  bool hasParameters (void) const;
42  bool findParameter (std::string parameterName) const;
43  friend std::ostream& operator<<(std::ostream& os, const SOAPCommand& command);
44 
45 private:
46  std::string command_;
47  SOAPParameters parameters_;
48 };
49 
50 
51 }
52 #endif