![]() |
User Manual, Developers Guide and API Documentation |
![]() |
#include <container/Pool.hpp>


Public Member Functions | |
| void | bind (ID id) |
| Tell the pool this Port is used. | |
| int | getCapacity () const |
| simTimeType | getUnbindDelay () const |
| Get the unbindDelay for this PortPool. | |
| bool | isAvailable (ID id) const |
| Check if a Port is still available. | |
| Pool (simTimeType _unbindDelay, ID _lowestId, ID _highestId) | |
| Full Pool (all 65535 Ports are available == in the pool). | |
| ID | suggestPort () const |
| Suggest a free port (will not bind the port!). | |
| void | unbind (ID id) |
| Tell the pool this Port is not used any longer. | |
| virtual | ~Pool () |
| Destructor. | |
Private Types | |
| typedef std::set< ID > | PoolContainer |
Private Attributes | |
| PoolContainer | boundIds |
| Keeps track of bound ports. | |
| ID | highestId |
| The highest possible port number (2^16 - 1). | |
| ID | lowestId |
| The highest possible port number (2^16 - 1). | |
| int | maximumCapacity |
| The number of IDs that may be bound. | |
| simTimeType | unbindDelay |
| The delay between call to unbind and the time instance when the port is returned to the port pool. | |
Classes | |
| class | Unbind |
| Unbind event which is used to delay the port reuse. More... | |
Definition at line 48 of file Pool.hpp.
typedef std::set<ID> wns::container::Pool< ID >::PoolContainer [private] |
| wns::container::Pool< ID >::Pool | ( | simTimeType | _unbindDelay, | |
| ID | _lowestId, | |||
| ID | _highestId | |||
| ) | [inline, explicit] |
| virtual wns::container::Pool< ID >::~Pool | ( | ) | [inline, virtual] |
| void wns::container::Pool< ID >::bind | ( | ID | id | ) | [inline] |
| int wns::container::Pool< ID >::getCapacity | ( | ) | const [inline] |
| simTimeType wns::container::Pool< ID >::getUnbindDelay | ( | ) | const [inline] |
| bool wns::container::Pool< ID >::isAvailable | ( | ID | id | ) | const [inline] |
| ID wns::container::Pool< ID >::suggestPort | ( | ) | const [inline] |
| void wns::container::Pool< ID >::unbind | ( | ID | id | ) | [inline] |
PoolContainer wns::container::Pool< ID >::boundIds [private] |
ID wns::container::Pool< ID >::highestId [private] |
ID wns::container::Pool< ID >::lowestId [private] |
int wns::container::Pool< ID >::maximumCapacity [private] |
simTimeType wns::container::Pool< ID >::unbindDelay [private] |
1.5.5