SST 15.0
Structural Simulation Toolkit
uninitializedQueue.h
1// Copyright 2009-2025 NTESS. Under the terms
2// of Contract DE-NA0003525 with NTESS, the U.S.
3// Government retains certain rights in this software.
4//
5// Copyright (c) 2009-2025, NTESS
6// All rights reserved.
7//
8// This file is part of the SST software package. For license
9// information, see the LICENSE file in the top level directory of the
10// distribution.
11
12#ifndef SST_CORE_UNINITIALIZEDQUEUE_H
13#define SST_CORE_UNINITIALIZEDQUEUE_H
14
15#include "sst/core/activityQueue.h"
16
17#include <string>
18
19namespace SST {
20
21/** Always uninitialized queue
22 * @brief Used for debugging, and preventing accidentally sending messages
23 * into an incorrect queue
24 */
25class UninitializedQueue : public ActivityQueue
26{
27public:
28 /** Create a new Queue
29 * @param message - Message to print when something attempts to use this Queue
30 */
31 explicit UninitializedQueue(const std::string& message);
32 UninitializedQueue() = default; // Only used for serialization
33 ~UninitializedQueue() override = default;
34
35 bool empty() override;
36 int size() override;
37 void insert(Activity* activity) override;
38 Activity* pop() override;
39 Activity* front() override;
40
41private:
42 std::string message;
43};
44
45} // namespace SST
46
47#endif // SST_CORE_UNINITIALIZEDQUEUE_H
Base class for all Activities in the SST Event Queue.
Definition activity.h:46
UninitializedQueue(const std::string &message)
Create a new Queue.
Definition uninitializedQueue.cc:22
bool empty() override
Returns true if the queue is empty.
Definition uninitializedQueue.cc:28
Activity * pop() override
Remove and return the next activity.
Definition uninitializedQueue.cc:49
void insert(Activity *activity) override
Insert a new activity into the queue.
Definition uninitializedQueue.cc:42
Activity * front() override
Returns the next activity.
Definition uninitializedQueue.cc:56
int size() override
Returns the number of activities in the queue.
Definition uninitializedQueue.cc:35