feat(queue): add TSPriorityQueue and TSTimerPriority

This commit is contained in:
fallenoak 2020-12-06 23:28:15 -06:00
parent 2200aab4c2
commit 2e82693829
No known key found for this signature in database
GPG key ID: 7628F8E61AEA070D
9 changed files with 264 additions and 0 deletions

View 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