mirror of
https://github.com/thunderbrewhq/squall.git
synced 2026-02-04 00:49:08 +00:00
feat(queue): add TSPriorityQueue and TSTimerPriority
This commit is contained in:
parent
2200aab4c2
commit
2e82693829
9 changed files with 264 additions and 0 deletions
26
storm/queue/TSPriorityQueue.hpp
Normal file
26
storm/queue/TSPriorityQueue.hpp
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#ifndef STORM_QUEUE_TS_PRIORITY_QUEUE_HPP
|
||||
#define STORM_QUEUE_TS_PRIORITY_QUEUE_HPP
|
||||
|
||||
#include "storm/queue/CSBasePriorityQueue.hpp"
|
||||
#include <cstdint>
|
||||
|
||||
template <class T>
|
||||
class TSPriorityQueue : public CSBasePriorityQueue {
|
||||
public:
|
||||
// Member functions
|
||||
TSPriorityQueue(uint32_t linkOffset);
|
||||
T* Dequeue();
|
||||
};
|
||||
|
||||
template <class T>
|
||||
TSPriorityQueue<T>::TSPriorityQueue(uint32_t linkOffset)
|
||||
: CSBasePriorityQueue() {
|
||||
this->m_linkOffset = linkOffset;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
T* TSPriorityQueue<T>::Dequeue() {
|
||||
return static_cast<T*>(CSBasePriorityQueue::Dequeue());
|
||||
}
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue