highlighter application
1.1
HCE project utils : highlighter
|
#include <HighlightStringGenerator.hpp>
Public Member Functions | |
HighlightStringGenerator () | |
void | setMaxNumber (unsigned int _maxNumber) |
void | setWordMapPtr (ContentsStorageBase::WordPosPtrType _wordMapPtr) |
void | setContent (Poco::SharedPtr< std::string > _contentPtr) |
void | setHlBegin (std::string _hlBegin) |
void | setHlEnd (std::string _hlEnd) |
void | addHighlightingAlgorithm (Poco::SharedPtr< HighlightingAlgorithmBase > _highlightingAlgorithm) |
void | setHighlightStringSticker (Poco::SharedPtr< HighlightStringStickerBase > _highlightStringStickerPtr) |
std::string | highlightStringGenerate (std::vector< std::vector< std::pair< SearchType, std::string > > > &vecSearchStrings) |
unsigned int | getHighlightCounts () |
void | highlightStringStickerReinit (Poco::SharedPtr< InDataStruct > inDataStructPtr) |
std::string | generateHighlightingAlgorithmsString (const std::string &separator) |
~HighlightStringGenerator () |
Protected Member Functions | |
std::vector< WordPos > | stickWordOffsetMaps (std::vector< std::map< unsigned int, WordPos > > &wordOffsetMaps) |
void | joinOverlapElements (std::map< unsigned int, WordPos > &resultingMap, std::vector< WordPos > &ret) |
Protected Attributes | |
unsigned int | maxNumber |
ContentsStorageBase::WordPosPtrType | wordMapPtr |
Poco::SharedPtr< std::string > | contentPtr |
std::string | hlBegin |
std::string | hlEnd |
std::vector< Poco::SharedPtr < HighlightingAlgorithmBase > > | highlightingAlgorithms |
Poco::SharedPtr < HighlightStringStickerBase > | highlightStringStickerPtr |
Definition at line 33 of file HighlightStringGenerator.hpp.
HighlightStringGenerator::HighlightStringGenerator | ( | ) |
Definition at line 18 of file HighlightStringGenerator.cpp.
HighlightStringGenerator::~HighlightStringGenerator | ( | ) |
Definition at line 22 of file HighlightStringGenerator.cpp.
|
inline |
Definition at line 88 of file HighlightStringGenerator.hpp.
std::string HighlightStringGenerator::generateHighlightingAlgorithmsString | ( | const std::string & | separator | ) |
HighlightStringGenerator::generateHighlightingAlgorithmsString method. Method generates information string from available HighlightingAlgorithms names.
Definition at line 135 of file HighlightStringGenerator.cpp.
|
inline |
Definition at line 98 of file HighlightStringGenerator.hpp.
std::string HighlightStringGenerator::highlightStringGenerate | ( | std::vector< std::vector< std::pair< SearchType, std::string > > > & | vecSearchStrings | ) |
HighlightStringGenerator::highlightStringGenerate method. highlightStringGenerate - public method, that performs main highlight processing. It calls specific highlightingAlgorithm, from highlightingAlgorithms vector, for each searchStrings. Keepts resulting maps in the wordOffsetMaps vactor. And gets resulting string from stickWordOffsetMaps() and fillOutPutStr() methods calls.
Definition at line 98 of file HighlightStringGenerator.cpp.
|
inline |
Definition at line 110 of file HighlightStringGenerator.hpp.
|
protected |
HighlightStringGenerator::joinOverlapElements method. Method sticks together overlap elements in the incoming resultingMap map
Definition at line 66 of file HighlightStringGenerator.cpp.
|
inline |
Definition at line 73 of file HighlightStringGenerator.hpp.
|
inline |
Definition at line 93 of file HighlightStringGenerator.hpp.
|
inline |
Definition at line 78 of file HighlightStringGenerator.hpp.
|
inline |
Definition at line 83 of file HighlightStringGenerator.hpp.
|
inline |
Definition at line 63 of file HighlightStringGenerator.hpp.
|
inline |
Definition at line 68 of file HighlightStringGenerator.hpp.
|
protected |
HighlightStringGenerator::stickWordOffsetMaps method. Receive vector of Highlight piaces maps and sticks it map together in one vector.
Definition at line 29 of file HighlightStringGenerator.cpp.
|
protected |
Definition at line 38 of file HighlightStringGenerator.hpp.
|
protected |
Definition at line 41 of file HighlightStringGenerator.hpp.
|
protected |
Definition at line 42 of file HighlightStringGenerator.hpp.
|
protected |
Definition at line 39 of file HighlightStringGenerator.hpp.
|
protected |
Definition at line 40 of file HighlightStringGenerator.hpp.
|
protected |
Definition at line 36 of file HighlightStringGenerator.hpp.
|
protected |
Definition at line 37 of file HighlightStringGenerator.hpp.