• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • KDE Support
  • Sitemap
  • Contact Us
 

strigi/src/streams

Strigi::KmpSearcher

Strigi::KmpSearcher Class Reference

Class for string search that uses the Knuth-Morris-Pratt algorithm. More...

#include <kmpsearcher.h>

List of all members.

Public Member Functions

 KmpSearcher (const std::string &query)
 KmpSearcher ()
 ~KmpSearcher ()
std::string query () const
int32_t queryLength () const
const char * search (const char *haystack, int32_t haylen) const
void setQuery (const std::string &query)

Detailed Description

Class for string search that uses the Knuth-Morris-Pratt algorithm.

Code based on the example on http://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm

Definition at line 34 of file kmpsearcher.h.


Constructor & Destructor Documentation

Strigi::KmpSearcher::KmpSearcher (  )  [inline]

Definition at line 41 of file kmpsearcher.h.

KmpSearcher::KmpSearcher ( const std::string &  query  ) 

Definition at line 93 of file kmpsearcher.cpp.

Strigi::KmpSearcher::~KmpSearcher (  )  [inline]

Definition at line 43 of file kmpsearcher.h.


Member Function Documentation

std::string Strigi::KmpSearcher::query (  )  const [inline]

Definition at line 50 of file kmpsearcher.h.

int32_t Strigi::KmpSearcher::queryLength (  )  const [inline]

Definition at line 49 of file kmpsearcher.h.

const char * KmpSearcher::search ( const char *  haystack,
int32_t  haylen 
) const

Find the needle in haystack.

Parameters:
haystack the text to search in.
haylen the length of the text to search in.
Returns:
a pointer to the start of the match if a match is found Otherwise 0.

Definition at line 116 of file kmpsearcher.cpp.

void Strigi::KmpSearcher::setQuery ( const std::string &  query  ) 

The documentation for this class was generated from the following files:
  • kmpsearcher.h
  • kmpsearcher.cpp

strigi/src/streams

Skip menu "strigi/src/streams"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

KDE Support

Skip menu "KDE Support"
  • akonadi
  • Decibel
  • grantlee
  • kdewin
  • phonon
  •     Backend
  • polkit-qt
  • qca
  • qimageblitz
  • soprano
  • strigi
  •     searchclient
  •     streamanalyzer
  •     streams
Generated for KDE Support by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal