Aho_Corasick< Type > Class Template Reference

Class which hold Aho-Corasick tree. More...

#include <Aho_Corasick.hpp>

List of all members.

Public Member Functions

 Aho_Corasick ()
 Default constructor.
 ~Aho_Corasick ()
 Default destructor.
void clean ()
 Remove root & create new (it doesn't clean all the nodes).
void add_pattern (const t_uid &patternId, int count, Type data[])
 Adding pattern to Aho-Corasick tree.
void remove_pattern (int count, Type data[])
 Remove pattern from tree, tree must be rebuild.
void commit_trie ()
 Build Aho-Corasick tree.
bool find_patterns (int count, Type textData[], bool(*CallbackProc)(const t_uid &, int, void *), void *context)
 Find all patterns and call a function delivered in CallbacProc param on every found pattern.

Private Attributes

TrieNoderoot

Classes

struct  TrieNode
 Node of the Aho-Corasick tree. More...


Detailed Description

template<class Type>
class Aho_Corasick< Type >

Class which hold Aho-Corasick tree.

Constructor & Destructor Documentation

template<class Type>
Aho_Corasick< Type >::Aho_Corasick (  )  [inline]

Default constructor.

Returns:

template<class Type>
Aho_Corasick< Type >::~Aho_Corasick (  )  [inline]

Default destructor.


Member Function Documentation

template<class Type>
void Aho_Corasick< Type >::clean (  )  [inline]

Remove root & create new (it doesn't clean all the nodes).

template<class Type>
void Aho_Corasick< Type >::add_pattern ( const t_uid patternId,
int  count,
Type  data[] 
) [inline]

Adding pattern to Aho-Corasick tree.

Parameters:
patternId 
count 
data 
Returns:

template<class Type>
void Aho_Corasick< Type >::remove_pattern ( int  count,
Type  data[] 
) [inline]

Remove pattern from tree, tree must be rebuild.

Parameters:
count 
data 
Returns:

template<class Type>
void Aho_Corasick< Type >::commit_trie (  )  [inline]

Build Aho-Corasick tree.

Returns:

template<class Type>
bool Aho_Corasick< Type >::find_patterns ( int  count,
Type  textData[],
bool(*)(const t_uid &, int, void *)  CallbackProc,
void *  context 
) [inline]

Find all patterns and call a function delivered in CallbacProc param on every found pattern.

Parameters:
count 
textData 
CallbackProc 
int 
context 
Returns:


Member Data Documentation

template<class Type>
TrieNode* Aho_Corasick< Type >::root [private]


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

Generated on Thu Oct 22 16:31:08 2009 for Limit server by  doxygen 1.5.6