highlighter application
1.1
HCE project utils : highlighter
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
ContentsStorageSimple.hpp
Go to the documentation of this file.
1
13
#ifndef CONTENTS_STORAGE_SIMPLE_HPP
14
#define CONTENTS_STORAGE_SIMPLE_HPP
15
16
#include <atomic>
17
#include <map>
18
#include <unistd.h>
19
20
#include "
ContentsStorageBase.hpp
"
21
22
class
ContentsStorageSimple
:
public
ContentsStorageBase
23
{
24
protected
:
25
void
fillWordPosMap
(Poco::SharedPtr<HCE::OutDataRefine> outDataRefine,
ContentsStorageBase::WordPosPtrType
ret);
26
std::map<unsigned long long, std::pair<WordPosPtrType, Poco::SharedPtr<std::atomic_flag> > >
wordPosCache
;
27
public
:
28
ContentsStorageSimple
(
unsigned
int
refinesCount);
29
virtual
WordPosPtrType
wordMapExctract
(
unsigned
long
long
key, std::string &incomeContent);
30
virtual
void
wordMapRelease
(
unsigned
long
long
key,
WordPosPtrType
&refinePtr);
31
void
cacheAddElement
(
unsigned
long
long
key,
WordPosPtrType
wordPos);
32
void
cacheClear
();
33
unsigned
int
getCacheSize
()
const
{
return
wordPosCache
.size();}
34
virtual
~ContentsStorageSimple
();
35
};
36
37
#endif
sources
src
ContentsStorageSimple.hpp
Generated on Mon Jan 13 2014 16:16:16 for highlighter application by
1.8.1.2