Bcps  0.93.12
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
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:

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...
 

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 ( )
inlinevirtual

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 
)
inlinevirtual

Add a knowledge to pool.

Definition at line 64 of file BcpsObjectPool.h.

virtual int BcpsObjectPool::getNumKnowledges ( ) const
inlinevirtual

Query how many knowledges are in the pool.

Definition at line 69 of file BcpsObjectPool.h.

virtual std::pair<AlpsKnowledge*, double> BcpsObjectPool::getKnowledge ( ) const
inlinevirtual

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

Definition at line 74 of file BcpsObjectPool.h.

virtual bool BcpsObjectPool::hasKnowledge ( ) const
inlinevirtual

Check whether the pool has knowledge.

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: