![]() |
LeechCraft 0.6.70-17769-g4e68d7fcba
Modular cross-platform feature rich live environment.
|
A simple pool of identificators of the given type. More...
#include "idpool.h"
Public Member Functions | |
| IDPool (const T &id=T()) | |
| Creates a pool with the given initial value. | |
| T | GetID () |
| Returns next ID. | |
| void | SetID (T id) |
| Forcefully sets the current ID. | |
| void | FreeID (T id) |
| Frees the id. | |
| QByteArray | SaveState () const |
| Saves the state of this pool. | |
| void | LoadState (const QByteArray &state) |
| Recovers the state of this pool. | |
A simple pool of identificators of the given type.
This class holds a pool of identificators of the given type T. It is very simple and produces consecutive IDs, this T should support operator++().
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
Recovers the state of this pool.
| [in] | state | The state of this pool obtained from SaveState(). |
|
inline |
|
inline |