hce-node application
1.4.3
HCE Hierarchical Cluster Engine node application
Main Page
Namespaces
Classes
Files
File List
File Members
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
19
FakeHCRCPlugin::FakeHCRCPlugin
() : _hCrc64()
20
{
24
ProcessInfo
processInfo;
25
SET_PROCESS_INFO_P
(processInfo,
HCRC
,
FAKE_HCRC
,
LM_ALL
, &
TPlugin::process
,
this
)
26
_exported
.push_back( processInfo );
27
}
28
29
30
FakeHCRCPlugin::~FakeHCRCPlugin
() {}
31
32
33
void
FakeHCRCPlugin::process
(
LCoreData
& lCData)
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 */
sources
utils
refine
src
FakeHCRCPlugin.cpp
Generated on Tue Jun 30 2015 19:42:16 for hce-node application by
1.8.1.2