mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 02:22:30 +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
23
storm/queue/CSBasePriorityQueue.hpp
Normal file
23
storm/queue/CSBasePriorityQueue.hpp
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#ifndef STORM_QUEUE_CS_BASE_PRIORITY_QUEUE_HPP
|
||||
#define STORM_QUEUE_CS_BASE_PRIORITY_QUEUE_HPP
|
||||
|
||||
#include "storm/Array.hpp"
|
||||
#include <cstdint>
|
||||
|
||||
class CSBasePriority;
|
||||
|
||||
class CSBasePriorityQueue : public TSGrowableArray<void*> {
|
||||
public:
|
||||
// Member variables
|
||||
uint32_t m_linkOffset;
|
||||
|
||||
// Member functions
|
||||
void* Dequeue();
|
||||
void Enqueue(void* val);
|
||||
CSBasePriority* Link(uint32_t index) const;
|
||||
void Remove(uint32_t index);
|
||||
void SetLink(uint32_t index);
|
||||
void* Top();
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue