ace::WordStore Class Reference

WordStore class implements word store concept (as described in file comment). More...

#include <word.h>

List of all members.

Public Member Functions

 WordStore (size_t memory_pool_block_size=1024) throw ()
 Constructor initializes memory pool with given (or default) size.
 ~WordStore (void) throw ()
 Destructor clears memory pool.
const Wordshift (const Word *from, ptrdiff_t offset=1) const throw ()
 Function shifts given pointer by given offset.
const Wordstart (void) const throw ()
const Wordstore (const Word &word)
 Function stores copy of given Word object and returns pointer to stored instance.

Private Member Functions

 WordStore (const WordStore &word_store)
 No copy constructs.
WordStoreoperator= (const WordStore &word_store)
 No assignments.


Detailed Description

WordStore class implements word store concept (as described in file comment).

The class is very simple - almost whole functionality is gathered inside ContinuousPool class.

Definition at line 106 of file word.h.


Constructor & Destructor Documentation

ace::WordStore::WordStore ( size_t  memory_pool_block_size = 1024  )  throw () [inline]

Constructor initializes memory pool with given (or default) size.

Parameters:
memory_pool_block_size Size of single memory pool block used to store Word(s).

Definition at line 121 of file word.h.


Member Function Documentation

const Word* ace::WordStore::shift ( const Word from,
ptrdiff_t  offset = 1 
) const throw () [inline]

Function shifts given pointer by given offset.

Parameters:
from Pointer to be shifted.
offset Shift offset.
Returns:
Pointer shifted by given offset or NULL, if any of params was invalid.
See also:
ContinuousPool::shift()

Definition at line 133 of file word.h.

const Word* ace::WordStore::start ( void   )  const throw () [inline]

Returns:
Pointer to first Word instance stored within word store or NULL, if store is empty.

Definition at line 136 of file word.h.

const Word * ace::WordStore::store ( const Word word  ) 

Function stores copy of given Word object and returns pointer to stored instance.

Parameters:
word Word instance to be stored.
Returns:
Pointer to stored copy of instance.
Exceptions:
std::bad_alloc When there is no more memory for storage.

Definition at line 18 of file word.cpp.


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

Generated on Mon May 5 00:50:55 2008 for ACE by  doxygen 1.5.5