CarobNS::ControllerPoolManager Class Reference

Holds a list of controller pools, that are indexed by their policy and list of controllers. More...

#include <ControllerPool.hpp>

List of all members.

Static Public Member Functions

static AbstractControllerPoolgetPool (std::vector< ControllerInfo > ctrls, ConnectPolicy cp) throw (DriverException, UnexpectedException)
 Returns a pool for the given pair controllers/policy.
static void freePool (AbstractControllerPool *pool)
 Decrements reference counter on the given pool.


Detailed Description

Holds a list of controller pools, that are indexed by their policy and list of controllers.

Permits to have only one instance of ControllerPool for the same controllers and policy, thus to share the connection info (ie. on which controller the last connection occured).


Member Function Documentation

static AbstractControllerPool& CarobNS::ControllerPoolManager::getPool ( std::vector< ControllerInfo ctrls,
ConnectPolicy  cp 
) throw (DriverException, UnexpectedException) [static]

Returns a pool for the given pair controllers/policy.


If the controller pool list already contains a pool suitable for given parameters, returns it after incrementing the reference count on it. If not found, creates a new controller pool, adds it to the list, increments its reference counter and returns it.

Parameters:
ctrls (ordered) controller list to connect to
cp policy to use
Returns:
a pool following the given policy for the given controllers distribution
Exceptions:
DriverException if the given policy is invalid

static void CarobNS::ControllerPoolManager::freePool ( AbstractControllerPool pool  )  [static]

Decrements reference counter on the given pool.

If no more references are made on this pool, removes it from the pool list and deletes it

Parameters:
pool the pool to release


The documentation for this class was generated from the following file:
Generated on Tue Oct 24 09:05:38 2006 for Carob by  doxygen 1.5.0