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 49 of file SearchResultLocator.hxx.

Constructor & Destructor Documentation

◆ SearchResultLocator()

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

Definition at line 60 of file SearchResultLocator.hxx.

Member Function Documentation

◆ find()

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

Definition at line 80 of file SearchResultLocator.cxx.

References findOne().

Referenced by findForPayload().

◆ findForPayload()

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

◆ findOne()

void sw::search::SearchResultLocator::findOne ( LocationResult rResult,
SearchIndexData const &  rSearchIndexData 
)
private

◆ tryParseJSON()

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().

◆ tryParseXML()

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::attribute(), tools::XmlWalker::children(), sw::search::CommonNode, tools::XmlWalker::isValid(), tools::XmlWalker::name(), tools::XmlWalker::next(), tools::XmlWalker::open(), tools::XmlWalker::parent(), sType, sw::search::Undefined, and sw::search::WriterNode.

Referenced by findForPayload().

Member Data Documentation

◆ mpDocument

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

Definition at line 51 of file SearchResultLocator.hxx.

Referenced by findOne().


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