7 #if !defined(MQTT_PACKET_ID_MANAGER_HPP)
8 #define MQTT_PACKET_ID_MANAGER_HPP
17 template <
typename PacketId>
19 using packet_id_t = PacketId;
43 return va_.
use(packet_id);
Definition: packet_id_manager.hpp:18
void clear()
Clear all packet ids.
Definition: packet_id_manager.hpp:59
optional< packet_id_t > acquire_unique_id()
Acquire the new unique packet id. If all packet ids are already in use, then returns nullopt After ac...
Definition: packet_id_manager.hpp:31
bool register_id(packet_id_t packet_id)
Register packet_id to the library. After registering the packet_id, you can call acquired_* functions...
Definition: packet_id_manager.hpp:42
void release_id(packet_id_t packet_id)
Release packet_id.
Definition: packet_id_manager.hpp:52
void deallocate(value_type value)
Dellocate one value.
Definition: value_allocator.hpp:138
optional< value_type > allocate()
Allocate one value.
Definition: value_allocator.hpp:98
void clear()
Clear all allocated or used values.
Definition: value_allocator.hpp:255
bool use(value_type value)
Declare the value as used.
Definition: value_allocator.hpp:237