ace::NGramToken Class Reference

Class purpose is to offer creation of temporary NGram instance to be used as a key value (token) when searching in NGramStore hashtables. More...

#include <ngram.h>

List of all members.

Static Public Member Functions

static void init (void)
 Performs class start-up initialization.
static NGramget (const raw_ngram_t &raw_ngram, ngram_type_t ngram_type)
static NGramget (const NGram *source, ngram_type_t ngram_type)

Static Private Attributes

static void * _ngram_space = 0
 Space to keep NGrams instances.


Detailed Description

Class purpose is to offer creation of temporary NGram instance to be used as a key value (token) when searching in NGramStore hashtables.

Note: This class is not thread-safe!


Member Function Documentation

void ace::NGramToken::init ( void   )  [static]

Performs class start-up initialization.

Must be called earlier than any of get() methods.

NGram * ace::NGramToken::get ( const raw_ngram_t raw_ngram,
ngram_type_t  ngram_type 
) [static]

Parameters:
raw_ngram Source raw N-gram.
ngram_type Type of N-gram to be created (determines which members of `raw_ngram` are copied).
Returns:
Pointer to temporary NGram instance constructed on the basis of given params.

NGram * ace::NGramToken::get ( const NGram source,
ngram_type_t  ngram_type 
) [static]

Parameters:
source Pointer to source N-gram (full type) which should be downcasted.
ngram_type Type of N-gram to be created (determines which members of `source` are copied).
Returns:
Pointer to temporary NGram instance downcast constructed on the basis of given params.


Member Data Documentation

void * ace::NGramToken::_ngram_space = 0 [static, private]

Space to keep NGrams instances.

For efficiency purposes declared as static.


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

Generated on Wed Aug 6 23:25:51 2008 for PACE by  doxygen 1.5.6