highlighter application  1.1
HCE project utils : highlighter
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
HighlightStringGenerator Class Reference

#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< WordPosstickWordOffsetMaps (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

Detailed Description

Definition at line 33 of file HighlightStringGenerator.hpp.

Constructor & Destructor Documentation

HighlightStringGenerator::HighlightStringGenerator ( )

Definition at line 18 of file HighlightStringGenerator.cpp.

HighlightStringGenerator::~HighlightStringGenerator ( )

Definition at line 22 of file HighlightStringGenerator.cpp.

Member Function Documentation

void HighlightStringGenerator::addHighlightingAlgorithm ( Poco::SharedPtr< HighlightingAlgorithmBase _highlightingAlgorithm)
inline

Definition at line 88 of file HighlightStringGenerator.hpp.

Here is the caller graph for this function:

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.

unsigned int HighlightStringGenerator::getHighlightCounts ( )
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.

Here is the call graph for this function:

void HighlightStringGenerator::highlightStringStickerReinit ( Poco::SharedPtr< InDataStruct inDataStructPtr)
inline

Definition at line 110 of file HighlightStringGenerator.hpp.

void HighlightStringGenerator::joinOverlapElements ( std::map< unsigned int, WordPos > &  resultingMap,
std::vector< WordPos > &  ret 
)
protected

HighlightStringGenerator::joinOverlapElements method. Method sticks together overlap elements in the incoming resultingMap map

Definition at line 66 of file HighlightStringGenerator.cpp.

Here is the caller graph for this function:

void HighlightStringGenerator::setContent ( Poco::SharedPtr< std::string >  _contentPtr)
inline

Definition at line 73 of file HighlightStringGenerator.hpp.

void HighlightStringGenerator::setHighlightStringSticker ( Poco::SharedPtr< HighlightStringStickerBase _highlightStringStickerPtr)
inline

Definition at line 93 of file HighlightStringGenerator.hpp.

Here is the caller graph for this function:

void HighlightStringGenerator::setHlBegin ( std::string  _hlBegin)
inline

Definition at line 78 of file HighlightStringGenerator.hpp.

void HighlightStringGenerator::setHlEnd ( std::string  _hlEnd)
inline

Definition at line 83 of file HighlightStringGenerator.hpp.

void HighlightStringGenerator::setMaxNumber ( unsigned int  _maxNumber)
inline

Definition at line 63 of file HighlightStringGenerator.hpp.

void HighlightStringGenerator::setWordMapPtr ( ContentsStorageBase::WordPosPtrType  _wordMapPtr)
inline

Definition at line 68 of file HighlightStringGenerator.hpp.

std::vector< WordPos > HighlightStringGenerator::stickWordOffsetMaps ( std::vector< std::map< unsigned int, WordPos > > &  wordOffsetMaps)
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.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

Poco::SharedPtr<std::string> HighlightStringGenerator::contentPtr
protected

Definition at line 38 of file HighlightStringGenerator.hpp.

std::vector<Poco::SharedPtr<HighlightingAlgorithmBase> > HighlightStringGenerator::highlightingAlgorithms
protected

Definition at line 41 of file HighlightStringGenerator.hpp.

Poco::SharedPtr<HighlightStringStickerBase> HighlightStringGenerator::highlightStringStickerPtr
protected

Definition at line 42 of file HighlightStringGenerator.hpp.

std::string HighlightStringGenerator::hlBegin
protected

Definition at line 39 of file HighlightStringGenerator.hpp.

std::string HighlightStringGenerator::hlEnd
protected

Definition at line 40 of file HighlightStringGenerator.hpp.

unsigned int HighlightStringGenerator::maxNumber
protected

Definition at line 36 of file HighlightStringGenerator.hpp.

ContentsStorageBase::WordPosPtrType HighlightStringGenerator::wordMapPtr
protected

Definition at line 37 of file HighlightStringGenerator.hpp.


The documentation for this class was generated from the following files: