nlib
nn::nlib::succinct::TrieBuilder Class Referencefinal

Class to create a Trie object. More...

#include "nn/nlib/succinct/Trie.h"

Public Member Functions

bool Init () noexcept
 Initializes an object. More...
 
TrieBuild (ReallocVec< uint32_t > *keyids=NULL) noexcept
 Creates a Trie object. More...
 
bool AddWord (const char *str) noexcept
 Adds a detection target string. More...
 
bool AddPattern (const void *p, size_t n) noexcept
 Adds detection target data. More...
 
bool AddWords (const char *str, size_t len) noexcept
 Adds a string from an array containing a set of target strings. The strings must be delimited by newlines (CRLF or LF). More...
 
bool AddWords (const char *str) noexcept
 Adds a string from an array containing a set of target strings. The strings must be delimited by newlines (CRLF or LF). More...
 
Basic Member Functions
 TrieBuilder () noexcept
 Instantiates the object.
 
 ~TrieBuilder () noexcept
 Destructor.
 

Detailed Description

Class to create a Trie object.

Description
Add target strings or patterns using methods such as AddWord, and then create the Trie object using the Build function. The user must delete the created Trie object.

Definition at line 62 of file Trie.h.

Member Function Documentation

§ AddPattern()

nn::nlib::succinct::TrieBuilder::AddPattern ( const void *  p,
size_t  n 
)
noexcept

Adds detection target data.

Parameters
[in]pPointer to data.
[in]nData size.
Returns
Returns true when successful.

§ AddWord()

nn::nlib::succinct::TrieBuilder::AddWord ( const char *  str)
noexcept

Adds a detection target string.

Parameters
[in]strString.
Returns
Returns true when successful.

§ AddWords() [1/2]

nn::nlib::succinct::TrieBuilder::AddWords ( const char *  str,
size_t  len 
)
noexcept

Adds a string from an array containing a set of target strings. The strings must be delimited by newlines (CRLF or LF).

Parameters
[in]strPointer to the string.
[in]lenThe string length (the value of strlen).
Returns
Returns true when successful.

§ AddWords() [2/2]

nn::nlib::succinct::TrieBuilder::AddWords ( const char *  str)
inlinenoexcept

Adds a string from an array containing a set of target strings. The strings must be delimited by newlines (CRLF or LF).

Parameters
[in]strPointer to the string.
Returns
Returns true when successful.

Definition at line 71 of file Trie.h.

§ Build()

nn::nlib::succinct::TrieBuilder::Build ( ReallocVec< uint32_t > *  keyids = NULL)
noexcept

Creates a Trie object.

Parameters
[out]keyidsStores the ID assigned to the string.
Returns
Pointer to the Trie object.
Description
Creates the Trie object.

§ Init()

nn::nlib::succinct::TrieBuilder::Init ( )
noexcept

Initializes an object.

Returns
Returns true when successful.

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