- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Attributes | List of all members
BcpsObjectPool Class Reference

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

`#include <BcpsObjectPool.h>`

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

## Public Member Functions
| BcpsObjectPool ()
| Default construct. More...
virtual | ~BcpsObjectPool ()
void | freeGuts ()
| Free object pointers. More...
void | clear ()
| Reset to empty. More...
virtual void | addKnowledge (AlpsKnowledge *nk, double priority)
| Add a knowledge to pool. More...
virtual int | getNumKnowledges () const
| Query how many knowledges are in the pool. More...
virtual std::pair < AlpsKnowledge *, double > | getKnowledge () const
| Query a knowledge, but doesn't remove it from the pool. More...
virtual bool | hasKnowledge () const
| Check whether the pool has knowledge. More...
void | deleteObject (int k)
| Delete object k from pool. More...
const std::vector < AlpsKnowledge * > & | getObjects () const
| Get all objects. More...
AlpsKnowledge * | getObject (int k) const
| Get a object. More...
Public Member Functions inherited from AlpsKnowledgePool
| AlpsKnowledgePool ()
virtual | ~AlpsKnowledgePool ()
virtual void | popKnowledge ()
| Remove the queried knowledge from the pool. More...
virtual void | setMaxNumKnowledges (int num)
| Set the quantity limit of knowledges that can be stored in the pool. More...
virtual int | getMaxNumKnowledges () const
| Query the quantity limit of knowledges. More...
virtual std::pair < AlpsKnowledge *, double > | getBestKnowledge () const
| Query the best knowledge in the pool. More...
virtual void | getAllKnowledges (std::vector< std::pair< AlpsKnowledge *, double > > &kls) const
| Get a reference to all the knowledges in the pool. More...

## 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:

- /tmp/CHiPPS-Blis-0.94.3/Bcps/src/BcpsObjectPool.h