Cleaning up and adding comments
This commit is contained in:
@@ -5,7 +5,9 @@
|
||||
#include "TDoublyLinkedList.h"
|
||||
|
||||
|
||||
|
||||
// Circular array-based queue implementation.
|
||||
// Used in Cat 1 to store print jobs (each job is a full document snapshot).
|
||||
// Demonstrates FIFO behavior through enqueue/dequeue operations.
|
||||
class TTreeQueue {
|
||||
private:
|
||||
std::string queue[MAX_SIZE];
|
||||
@@ -17,8 +19,8 @@ public:
|
||||
TTreeQueue() = default;
|
||||
~TTreeQueue() = default;
|
||||
|
||||
void Enqueue(const std::string& text);
|
||||
std::string Dequeue();
|
||||
void Enqueue(const std::string& text); // Adds a new job at the tail of the queue.
|
||||
std::string Dequeue(); // Removes and returns the next job in FIFO order.
|
||||
[[nodiscard]] int GetTail() const;
|
||||
[[nodiscard]] std::string Peek() const;
|
||||
[[nodiscard]] bool IsEmpty() const;
|
||||
|
||||
Reference in New Issue
Block a user