BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
BALL::SmartsMatcher::RecStructPool_ Class Reference

class which does the pool operations of the RecStructCore_ pool More...

#include <BALL/STRUCTURE/smartsMatcher.h>

Public Member Functions

 RecStructPool_ ()
 default constructors More...
 
virtual ~RecStructPool_ ()
 destructor More...
 
RecStructCore_getNextFree ()
 returns the a free RecStructCore_ of the pool (creates new ones if needed) More...
 
Position getLastPosition ()
 returns the position of the last RecStructCore_* from getNextFree() More...
 
void destroy (Position pos)
 frees the structure at position pos More...
 

Private Member Functions

void resize_ ()
 does the resize operation of the pool (creates new ones, but never release them!) More...
 
 RecStructPool_ (const RecStructPool_ &)
 copy constructor (declared private as it does not make sense to use it) More...
 
RecStructPool_operator= (const RecStructPool_ &)
 assignment operator (declared private as it does not make sense to use it) More...
 

Private Attributes

std::vector< RecStructCore_ * > rec_struct_pool_
 the pool of the RecStructCore_ structures More...
 
std::vector< Positionfree_list_
 the list of the free to use structures, represented as positions in the rec_struct_pool_ vector More...
 
Position last_position_
 the last position of returned structure from getNextFree() More...
 

Detailed Description

class which does the pool operations of the RecStructCore_ pool

Definition at line 157 of file smartsMatcher.h.

Constructor & Destructor Documentation

BALL::SmartsMatcher::RecStructPool_::RecStructPool_ ( )

default constructors

virtual BALL::SmartsMatcher::RecStructPool_::~RecStructPool_ ( )
virtual

destructor

BALL::SmartsMatcher::RecStructPool_::RecStructPool_ ( const RecStructPool_ )
private

copy constructor (declared private as it does not make sense to use it)

Member Function Documentation

void BALL::SmartsMatcher::RecStructPool_::destroy ( Position  pos)

frees the structure at position pos

Position BALL::SmartsMatcher::RecStructPool_::getLastPosition ( )

returns the position of the last RecStructCore_* from getNextFree()

RecStructCore_* BALL::SmartsMatcher::RecStructPool_::getNextFree ( )

returns the a free RecStructCore_ of the pool (creates new ones if needed)

RecStructPool_& BALL::SmartsMatcher::RecStructPool_::operator= ( const RecStructPool_ )
private

assignment operator (declared private as it does not make sense to use it)

void BALL::SmartsMatcher::RecStructPool_::resize_ ( )
private

does the resize operation of the pool (creates new ones, but never release them!)

Member Data Documentation

std::vector<Position> BALL::SmartsMatcher::RecStructPool_::free_list_
private

the list of the free to use structures, represented as positions in the rec_struct_pool_ vector

Definition at line 191 of file smartsMatcher.h.

Position BALL::SmartsMatcher::RecStructPool_::last_position_
private

the last position of returned structure from getNextFree()

Definition at line 194 of file smartsMatcher.h.

std::vector<RecStructCore_*> BALL::SmartsMatcher::RecStructPool_::rec_struct_pool_
private

the pool of the RecStructCore_ structures

Definition at line 188 of file smartsMatcher.h.