HikoGUI
A low latency retained GUI
|
#include <hikogui/concurrency/id_factory.hpp>
Public Types | |
using | value_type = T |
Public Member Functions | |
id_factory (id_factory const &)=delete | |
id_factory (id_factory &&)=delete | |
id_factory & | operator= (id_factory const &)=delete |
id_factory & | operator= (id_factory &&)=delete |
value_type | acquire () noexcept |
Get the next ID. | |
void | release (value_type v) noexcept |
Release an ID for reuse. | |
value_type | operator++ () noexcept |
A factory for unique IDs.
This factory allows you to release an ID so that it may be reused at a later time.
Acquiring a new ID
|
inlinenoexcept |
Get the next ID.
|
inlinenoexcept |
|
inlinenoexcept |
Release an ID for reuse.
If you want to release from a real-time thread you may post this on the main thread.
v | The ID to release |