35 #include <QDataStream> 103 QDataStream ostr (&result, QIODevice::WriteOnly);
118 if (state.isEmpty ())
121 QDataStream istr (state);
127 qWarning () << Q_FUNC_INFO
130 <<
", not restoring state.";
A simple pool of identificators of the given type.
virtual ~IDPool()
Destroys the pool.
IDPool(const T &id=T())
Creates a pool with the given initial value.
void SetID(T id)
Forcefully sets the current ID.
void FreeID(T id)
Frees the id.
void LoadState(const QByteArray &state)
Recovers the state of this pool.
T GetID()
Returns next ID.
QByteArray SaveState() const
Saves the state of this pool.