#include <sequential_id_generator.h>
Definition at line 20 of file sequential_id_generator.h.
◆ SequentialIdGenerator()
flutter::SequentialIdGenerator::SequentialIdGenerator |
( |
uint32_t |
min_id, |
|
|
uint32_t |
max_id |
|
) |
| |
|
explicit |
◆ ~SequentialIdGenerator()
flutter::SequentialIdGenerator::~SequentialIdGenerator |
( |
| ) |
|
◆ GetGeneratedId()
uint32_t flutter::SequentialIdGenerator::GetGeneratedId |
( |
uint32_t |
number | ) |
|
Definition at line 32 of file sequential_id_generator.cc.
33 auto it = number_to_id_.find(number);
34 if (it != number_to_id_.end())
37 auto id = GetNextAvailableId();
38 number_to_id_.emplace(number,
id);
39 id_to_number_.emplace(
id, number);
Referenced by flutter::testing::TEST().
◆ HasGeneratedIdFor()
bool flutter::SequentialIdGenerator::HasGeneratedIdFor |
( |
uint32_t |
number | ) |
const |
◆ ReleaseId()
void flutter::SequentialIdGenerator::ReleaseId |
( |
uint32_t |
id | ) |
|
Definition at line 54 of file sequential_id_generator.cc.
55 if (id_to_number_.count(
id) > 0U) {
56 UpdateNextAvailableIdAfterRelease(
id);
57 Remove(id_to_number_[
id], &number_to_id_, &id_to_number_);
◆ ReleaseNumber()
void flutter::SequentialIdGenerator::ReleaseNumber |
( |
uint32_t |
number | ) |
|
The documentation for this class was generated from the following files: