OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GUI::NotificationManager::NotificationIDProvider Class Reference
Collaboration diagram for Slic3r::GUI::NotificationManager::NotificationIDProvider:

Public Member Functions

int allocate_id ()
void release_id (int id)

Private Attributes

int m_next_id { 1 }
std::vector< int > m_released_ids

Detailed Description

Member Function Documentation

◆ allocate_id()

int Slic3r::GUI::NotificationManager::NotificationIDProvider::allocate_id ( )
163{
164 int id;
165 if (m_released_ids.empty())
166 id = ++m_next_id;
167 else {
168 id = m_released_ids.back();
169 m_released_ids.pop_back();
170 }
171 return id;
172}
int m_next_id
Definition NotificationManager.hpp:465
std::vector< int > m_released_ids
Definition NotificationManager.hpp:467

References m_next_id, and m_released_ids.

◆ release_id()

void Slic3r::GUI::NotificationManager::NotificationIDProvider::release_id ( int id)
174{
175 m_released_ids.push_back(id);
176}

References m_released_ids.

Member Data Documentation

◆ m_next_id

int Slic3r::GUI::NotificationManager::NotificationIDProvider::m_next_id { 1 }
private
465{ 1 };

Referenced by allocate_id().

◆ m_released_ids

std::vector<int> Slic3r::GUI::NotificationManager::NotificationIDProvider::m_released_ids
private

Referenced by allocate_id(), and release_id().


The documentation for this class was generated from the following files: