LibreOffice Module sw (master)  1
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
sw::search::SearchResultLocator Class Reference

#include <SearchResultLocator.hxx>

Collaboration diagram for sw::search::SearchResultLocator:
[legend]

Public Member Functions

 SearchResultLocator (SwDoc *pDoc)
 
LocationResult find (std::vector< SearchIndexData > const &rSearchIndexDataVector)
 
LocationResult findForPayload (const char *pPayload)
 

Private Member Functions

void findOne (LocationResult &rResult, SearchIndexData const &rSearchIndexData)
 

Static Private Member Functions

static bool tryParseJSON (const char *pPayload, std::vector< sw::search::SearchIndexData > &rDataVector)
 Trying to parse the payload as JSON. More...
 
static bool tryParseXML (const char *pPayload, std::vector< sw::search::SearchIndexData > &rDataVector)
 Trying to parse the payload as XML. More...
 

Private Attributes

SwDocmpDocument
 

Detailed Description

Definition at line 48 of file SearchResultLocator.hxx.

Constructor & Destructor Documentation

sw::search::SearchResultLocator::SearchResultLocator ( SwDoc pDoc)
inline

Definition at line 59 of file SearchResultLocator.hxx.

Member Function Documentation

LocationResult sw::search::SearchResultLocator::find ( std::vector< SearchIndexData > const &  rSearchIndexDataVector)

Definition at line 80 of file SearchResultLocator.cxx.

References findOne().

Referenced by findForPayload().

LocationResult sw::search::SearchResultLocator::findForPayload ( const char *  pPayload)

Definition at line 191 of file SearchResultLocator.cxx.

References find(), tryParseJSON(), and tryParseXML().

void sw::search::SearchResultLocator::findOne ( LocationResult rResult,
SearchIndexData const &  rSearchIndexData 
)
private
bool sw::search::SearchResultLocator::tryParseJSON ( const char *  pPayload,
std::vector< sw::search::SearchIndexData > &  rDataVector 
)
staticprivate

Trying to parse the payload as JSON.

Returns true if parsing was successful and the payload was identified as JSON, else false

Definition at line 93 of file SearchResultLocator.cxx.

References sw::search::CommonNode, nIndex, sType, sw::search::Undefined, and sw::search::WriterNode.

Referenced by findForPayload().

bool sw::search::SearchResultLocator::tryParseXML ( const char *  pPayload,
std::vector< sw::search::SearchIndexData > &  rDataVector 
)
staticprivate

Trying to parse the payload as XML.

Returns true if parsing was successful and the payload was identified as XML, else false

Definition at line 144 of file SearchResultLocator.cxx.

References SL::aData, tools::XmlWalker::children(), sw::search::CommonNode, sw::search::SearchIndexData::maObjectName, sw::search::SearchIndexData::meType, sw::search::SearchIndexData::mnNodeIndex, sType, sw::search::Undefined, and sw::search::WriterNode.

Referenced by findForPayload().

Member Data Documentation

SwDoc* sw::search::SearchResultLocator::mpDocument
private

Definition at line 50 of file SearchResultLocator.hxx.

Referenced by findOne().


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