SST  15.1.0
StructuralSimulationToolkit
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 
19 namespace SST {
20 
21 /** Always uninitialized queue
22  * @brief Used for debugging, and preventing accidentally sending messages
23  * into an incorrect queue
24  */
26 {
27 public:
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 
41 private:
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:47
int size() override
Returns the number of activities in the queue.
Definition: uninitializedQueue.cc:38
Always uninitialized queue.
Definition: uninitializedQueue.h:25
Definition: action.cc:18
Activity * front() override
Returns the next activity.
Definition: uninitializedQueue.cc:59
bool empty() override
Returns true if the queue is empty.
Definition: uninitializedQueue.cc:31
Base Class for a queue of Activities.
Definition: activityQueue.h:21
Activity * pop() override
Remove and return the next activity.
Definition: uninitializedQueue.cc:52
void insert(Activity *activity) override
Insert a new activity into the queue.
Definition: uninitializedQueue.cc:45