35 #include <QDataStream>
57 IDPool (
const T&
id = T ())
102 QDataStream ostr (&result, QIODevice::WriteOnly);
117 if (state.isEmpty ())
120 QDataStream istr (state);
126 qWarning () << Q_FUNC_INFO
129 <<
", not restoring state.";
A simple pool of identificators of the given type.
void FreeID(T)
Frees the id.
void SetID(T id)
Forcefully sets the current ID.
QByteArray SaveState() const
Saves the state of this pool.
void LoadState(const QByteArray &state)
Recovers the state of this pool.