#include <Aho_Corasick.hpp>
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 | |
TrieNode * | root |
Classes | |
struct | TrieNode |
Node of the Aho-Corasick tree. More... |
Aho_Corasick< Type >::Aho_Corasick | ( | ) | [inline] |
Default constructor.
Aho_Corasick< Type >::~Aho_Corasick | ( | ) | [inline] |
Default destructor.
void Aho_Corasick< Type >::clean | ( | ) | [inline] |
Remove root & create new (it doesn't clean all the nodes).
void Aho_Corasick< Type >::add_pattern | ( | const t_uid & | patternId, | |
int | count, | |||
Type | data[] | |||
) | [inline] |
Adding pattern to Aho-Corasick tree.
patternId | ||
count | ||
data |
void Aho_Corasick< Type >::remove_pattern | ( | int | count, | |
Type | data[] | |||
) | [inline] |
Remove pattern from tree, tree must be rebuild.
count | ||
data |
void Aho_Corasick< Type >::commit_trie | ( | ) | [inline] |
Build Aho-Corasick tree.
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.
count | ||
textData | ||
CallbackProc | ||
int | ||
context |
TrieNode* Aho_Corasick< Type >::root [private] |