# BcpsObjectPool Class Reference

Object pool is used to store objects. More...

`#include <BcpsObjectPool.h>`

Inheritance diagram for BcpsObjectPool:
[legend]
Collaboration diagram for BcpsObjectPool:
[legend]

List of all members.

## Public Member Functions
| BcpsObjectPool ()
| Default construct.
virtual | ~BcpsObjectPool ()
void | freeGuts ()
| Free object pointers.
void | clear ()
| Reset to empty.
virtual void | addKnowledge (AlpsKnowledge *nk, double priority)
| Add a knowledge to pool.
virtual int | getNumKnowledges () const
| Query how many knowledges are in the pool.
virtual std::pair < AlpsKnowledge *, double > | getKnowledge () const
| Query a knowledge, but doesn't remove it from the pool.
virtual bool | hasKnowledge () const
| Check whether the pool has knowledge.
void | deleteObject (int k)
| Delete object k from pool.
const std::vector < AlpsKnowledge * > & | getObjects () const
| Get all objects.
AlpsKnowledge * | getObject (int k) const
| Get a object.
## Protected Attributes
std::vector< AlpsKnowledge * > | objects_

## Detailed Description

Object pool is used to store objects.

Definition at line 36 of file BcpsObjectPool.h.

## Constructor & Destructor Documentation

BcpsObjectPool::BcpsObjectPool | ( |  | ) | `[inline]`

Default construct.

Definition at line 45 of file BcpsObjectPool.h.

virtual BcpsObjectPool::~BcpsObjectPool | ( |  | ) | `[inline, virtual]`

Definition at line 46 of file BcpsObjectPool.h.

## Member Function Documentation

void BcpsObjectPool::freeGuts | ( |  | ) | `[inline]`

Free object pointers.

Definition at line 53 of file BcpsObjectPool.h.

void BcpsObjectPool::clear | ( |  | ) | `[inline]`

Reset to empty.

Don't free memory.

Definition at line 61 of file BcpsObjectPool.h.

virtual void BcpsObjectPool::addKnowledge | ( | AlpsKnowledge * | nk,
|  | double | priority |
| ) |  |  | `[inline, virtual]`

Add a knowledge to pool.

Implements AlpsKnowledgePool.

Definition at line 64 of file BcpsObjectPool.h.

virtual int BcpsObjectPool::getNumKnowledges | ( |  | ) | const`[inline, virtual]`

Query how many knowledges are in the pool.

Implements AlpsKnowledgePool.

Definition at line 69 of file BcpsObjectPool.h.

virtual std::pair<AlpsKnowledge*, double> BcpsObjectPool::getKnowledge | ( |  | ) | const`[inline, virtual]`

Query a knowledge, but doesn't remove it from the pool.

Implements AlpsKnowledgePool.

Definition at line 74 of file BcpsObjectPool.h.

virtual bool BcpsObjectPool::hasKnowledge | ( |  | ) | const`[inline, virtual]`

Check whether the pool has knowledge.

Reimplemented from AlpsKnowledgePool.

Definition at line 79 of file BcpsObjectPool.h.

void BcpsObjectPool::deleteObject | ( | int | k | ) | `[inline]`

Delete object k from pool.

Definition at line 83 of file BcpsObjectPool.h.

const std::vector<AlpsKnowledge *>& BcpsObjectPool::getObjects | ( |  | ) | const`[inline]`

Get all objects.

Definition at line 96 of file BcpsObjectPool.h.

AlpsKnowledge* BcpsObjectPool::getObject | ( | int | k | ) | const`[inline]`

Get a object.

Definition at line 99 of file BcpsObjectPool.h.

## Member Data Documentation

std::vector<AlpsKnowledge *> BcpsObjectPool::objects_`[protected]`

Definition at line 40 of file BcpsObjectPool.h.

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

- /home/coin/svn-release/Bcps-0.93.10/Bcps/src/BcpsObjectPool.h