hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
DRCEAvgCountsConverter.cpp
Go to the documentation of this file.
3 
4 namespace HCE
5 {
6 namespace drce
7 {
8 //-----------------------------------------------------------------------------
10 : avgCounts()
11 {
12 }
13 //-----------------------------------------------------------------------------
15 : avgCounts(rhs)
16 {
17 }
18 //-----------------------------------------------------------------------------
20 : avgCounts()
21 {
22  fromDictionary(rhs);
23 }
24 //-----------------------------------------------------------------------------
25 void AvgCountsConverter::toDictionary(const std::string& key, const size_t& value, Dictionary& dic)
26 {
27  dic[key] = value;
28 }
29 //-----------------------------------------------------------------------------
30 void AvgCountsConverter::fromDictionary(const std::string& key, size_t& value, const Dictionary& dic)
31 {
32  Dictionary dictionary(dic);
33  Poco::Dynamic::Var tmp = dictionary[key];
34  if (tmp.isInteger())
35  value = tmp.convert<size_t>();
36 }
37 //-----------------------------------------------------------------------------
39 {
40  Dictionary dictionary;
51  return dictionary;
52 }
53 //-----------------------------------------------------------------------------
55 {
56  avgCounts = rhs;
57 }
58 //-----------------------------------------------------------------------------
60 {
71 }
72 //-----------------------------------------------------------------------------
73 //-----------------------------------------------------------------------------
74 } // end namespace drce
75 } // end namespace HCE