#include <ControllerPool.hpp>
Static Public Member Functions | |
| static AbstractControllerPool & | getPool (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. | |
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).
| 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.
| ctrls | (ordered) controller list to connect to | |
| cp | policy to use |
| 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
| pool | the pool to release |
1.5.0