hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
AdminCommandParameters.hpp
Go to the documentation of this file.
1 
14 #ifndef ADMIN_COMMAND_PARAMETERS_HPP
15 #define ADMIN_COMMAND_PARAMETERS_HPP
16 
17 #include "JsonSerializable.hpp"
18 
19 namespace HCE
20 {
21 namespace handlers
22 {
23 //-----------------------------------------------------------------------------
25 {
26  // json route message names
27  const std::string PARAMETERS = "parameters";
28  const std::string REALTIME = "realtime";
29 public:
31  {
35  };
36 public:
37  explicit AdminCommandParameters(const std::string& str="");
39 
40  bool serialize(std::string& json);
41  bool unserialize(const std::string& json);
42 
43  void clear(void);
44 
45  void setParameters(const std::string& parameters_) {parameters=parameters_;}
46  std::string getParameters(void) const {return parameters;}
47 
48  void setRealtime(unsigned int realtime_) {realtime=realtime_;}
49  unsigned int getRealtime(void) const {return realtime;}
50 
51  bool isRealtime(void) const;
52  bool isJsonString(void) const {return _isJson;}
53 private:
54  bool isJsonString(const std::string& str);
55 private:
56  std::string parameters;
57  unsigned int realtime;
58  bool _isJson;
59 
60  typedef IJsonSerializable inherited;
61 };
62 //-----------------------------------------------------------------------------
63 //-----------------------------------------------------------------------------
64 } // end namespace handlers
65 } // end namespace HCE
66 
67 #endif // ADMIN_COMMAND_PARAMETERS_HPP