hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
FakeHCRCPlugin.cpp
Go to the documentation of this file.
1 
5 #ifdef _DEBUG_
6  #include <iostream>
7 #endif
8 
9 
10 #include "FakeHCRCPlugin.hpp"
11 
12 namespace HCE
13 {
14 
15 namespace component
16 {
17 
18 
20 {
24  ProcessInfo processInfo;
26  _exported.push_back( processInfo );
27 }
28 
29 
31 
32 
34 {
38  std::map<WORD_CONTENT_OFFSET, SSTRING>::const_iterator it;
39  for ( it=lCData._mapTokens.begin(); it!=lCData._mapTokens.end(); ++it )
40  {
41  u_int64_t hCrc64 = _hCrc64.calc( it->second.c_str(), it->second.length() );
42  lCData._mapHCRC64[ it->first ] = hCrc64;
43  }
44 #ifdef _DEBUG_
45  std::cout << std::endl << "FakeHCRCPlugin plugin:" << std::endl << std::endl;
49  std::map<WORD_CONTENT_OFFSET, WORD_LENGTH>::const_iterator it1;
50  std::cout << "token \t hCrc" << std::endl;
51  std::cout << "----- \t ----" << std::endl;
52  for( it1=lCData._mapOffsets.begin(); it1!=lCData._mapOffsets.end(); ++it1)
53  {
54  std::cout << lCData._mapTokens[it1->first] << '\t'
55  << lCData._mapHCRC64[it1->first] << std::endl;
56  }
57  std::cout << "Tokens count: " << lCData._mapOffsets.size() << std::endl << std::endl;
58 #endif
59 }
60 
61 
62 } /* namespace component */
63 
64 } /* namespace HCE */