Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

boyer Class Reference

implementation of Boyer-more search algorithm More...

#include <dsBoyer.h>

Inheritance diagram for boyer:

boyer_base List of all members.

Public Methods

 boyer (const char *pattern)
 ~boyer ()
template<class T> T * find (T *text, int n) const
template<class T> T * ucfind (T *text, int n) const
int len ()
 operator const char * () const
 operator int () const

Protected Attributes

int _skip [BOYER_MAXCHAR]
int _len
char * _pat

Detailed Description

This class implement well known boyer-more string searching. Search pattern strdup'ed into class space

Todo:
Pattren length should be passed as parameter

ignorecase should be defined as global flag, pattren should be lowercased at compile time


Constructor & Destructor Documentation

boyer::boyer const char *    pattern [inline]
 

Construct an oblect from pattern

boyer::~boyer   [inline]
 


Member Function Documentation

template<class T>
T* boyer_base::find T *    text,
int    n
const [inline, inherited]
 

find pattren in text length of
return pointer to start of found pattern or NULL

Suitable value for T is char, unsigned char, byte

int boyer_base::len   [inline, inherited]
 

return length of stored pattern

boyer_base::operator const char *   const [inline, inherited]
 

return pointer to stored pattern

boyer_base::operator int   const [inline, inherited]
 

return length of stored pattern

template<class T>
T* boyer_base::ucfind T *    text,
int    n
const [inline, inherited]
 

find pattren in text length of
return pointer to start of found pattern or NULL case ignored. pattren should be lowercased

Suitable value for T is char, unsigned char, byte


Member Data Documentation

int boyer_base::_len [protected, inherited]
 

char* boyer_base::_pat [protected, inherited]
 

int boyer_base::_skip[BOYER_MAXCHAR] [protected, inherited]
 


The documentation for this class was generated from the following file:
Generated on Mon May 16 18:26:59 2005 for libdms4 by doxygen1.3-rc2