hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
DRCEAvgCountsConverter.hpp
Go to the documentation of this file.
1 
14 #ifndef DRCE_AVG_COUNTS_CONVERTER_HPP
15 #define DRCE_AVG_COUNTS_CONVERTER_HPP
16 
17 #include <map>
18 #include <Poco/Dynamic/Var.h>
19 
20 #include "DRCEAvgCounts.hpp"
21 
22 namespace HCE
23 {
24 namespace drce
25 {
26 //-----------------------------------------------------------------------------
28 {
29 public:
30  typedef std::map<std::string, Poco::Dynamic::Var> Dictionary;
31 
32  AvgCountsConverter(void);
33  explicit AvgCountsConverter(const AvgCounts& rhs);
34  explicit AvgCountsConverter(const Dictionary& rhs);
35 
36  AvgCounts toObject(void) const {return avgCounts;}
38 
39  void fromObject(const AvgCounts& rhs);
40  void fromDictionary(const Dictionary& rhs);
41 private:
42  static void toDictionary(const std::string& key, const size_t& value, Dictionary& dic);
43  static void fromDictionary(const std::string& key, size_t& value, const Dictionary& dic);
44 private:
45  AvgCounts avgCounts;
46 };
47 //-----------------------------------------------------------------------------
48 //-----------------------------------------------------------------------------
49 } // end namespace drce
50 } // end namespace HCE
51 
52 #endif // DRCE_AVG_COUNTS_CONVERTER_HPP