Pool of objects.
More...
#include <hpp/pinocchio/pool.hh>
|
T * | acquire () |
|
void | release (T *t) |
|
bool | available () const |
| Returns true is at least one object is not locked.
|
|
std::size_t | size () const |
|
void | clear () |
| Deletes all internal objects.
|
|
void | push_back (T *t) |
|
template<class InputIterator > |
void | push_back (InputIterator first, InputIterator last) |
|
| ~Pool () |
|
| Pool () |
| Constructor.
|
|
template<typename T>
class hpp::pinocchio::Pool< T >
Pool of objects.
Usage:
std::vector<Foo*> temporary_foos;
Pool of objects.
Definition pool.hh:57
void push_back(T *t)
Definition pool.hh:99
T * acquire()
Definition pool.hh:61
void release(T *t)
Definition pool.hh:73
◆ ~Pool()
◆ Pool()
◆ acquire()
Get an object from the pool. If the pool is empty, wait until one element becomes available.
◆ available()
Returns true is at least one object is not locked.
◆ clear()
Deletes all internal objects.
◆ push_back() [1/2]
template<typename T >
template<class InputIterator >
Add objects to the pool The pool takes ownership of the object
◆ push_back() [2/2]
Adds an object to the pool The pool takes ownership of the object
◆ release()
Release a previously acquired object.
- Warning
- There is no check that the object was actually one returned by Pool::acquire
◆ size()
The documentation for this class was generated from the following file: