mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2024-11-16 00:12:43 +00:00
28 lines
568 B
C++
28 lines
568 B
C++
#ifndef WIDGETLOCKREGISTRY_H
|
|
#define WIDGETLOCKREGISTRY_H
|
|
|
|
#include <vector>
|
|
#include <widgetlock.h>
|
|
|
|
class widgetlockregistry {
|
|
std::vector<widgetlock*> locks;
|
|
|
|
public:
|
|
widgetlockregistry() : locks() {}
|
|
virtual ~widgetlockregistry() {}
|
|
void add(widgetlock* lock) {
|
|
locks.push_back(lock);
|
|
}
|
|
|
|
void deleteListeners() {
|
|
while(!locks.empty()) {
|
|
widgetlock* lock = locks.back();
|
|
lock->deleteListener();
|
|
delete lock;
|
|
locks.pop_back();
|
|
}
|
|
}
|
|
};
|
|
|
|
#endif // WIDGETLOCKREGISTRY_H
|