class WordChainElemPool

This class is a pool of pre-allocated WordChainElem structures.

Public Methods

[more]void returnElem( WordChainElem* elem )
Returns a WordChainElem instance that is no longer required to the pool

Public Members

[more] Creates the pool.
[more] 'max_size' is the initial size of the pool
[more] 'realloc_amount_' is the number of additional WordChainElem instances
[more] that are to be allocated each time the pool empties
[more] If 'realloc_amount_' is undefined, then 'max_size' elements are
[more] Gets the next free WordChainElem instance from the pool.


Documentation

This class is a pool of pre-allocated WordChainElem structures. It's purpose is to enable fast access to the WordChainElem instances during decoding. If the pool is empty, and something asks for a WordChainElem instance then a block of new instances are allocated before the requested instance is returned.

o Creates the pool.
Creates the pool.

o 'max_size' is the initial size of the pool
'max_size' is the initial size of the pool

o 'realloc_amount_' is the number of additional WordChainElem instances
'realloc_amount_' is the number of additional WordChainElem instances

o that are to be allocated each time the pool empties
that are to be allocated each time the pool empties

o If 'realloc_amount_' is undefined, then 'max_size' elements are
If 'realloc_amount_' is undefined, then 'max_size' elements are

o Gets the next free WordChainElem instance from the pool.
Gets the next free WordChainElem instance from the pool. Allocates

ovoid returnElem( WordChainElem* elem )
Returns a WordChainElem instance that is no longer required to the pool


This class has no child classes.
Author:
Darren Moore (moore@idiap.ch)

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.