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