SST  8.0.0
StructuralSimulationToolkit
uninitializedQueue.h
1 // Copyright 2009-2018 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-2018, 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 
13 #ifndef SST_CORE_UNINITIALIZEDQUEUE_H
14 #define SST_CORE_UNINITIALIZEDQUEUE_H
15 
16 #include <sst/core/activityQueue.h>
17 
18 namespace SST {
19 
20 /** Always uninitialized queue
21  * @brief Used for debugging, and preventing accidentally sending messages
22  * into an incorrect queue
23  */
25 public:
26  /** Create a new Queue
27  * @param message - Message to print when something attempts to use this Queue
28  */
29  UninitializedQueue(std::string message);
30  UninitializedQueue(); // Only used for serialization
32 
33  bool empty() override;
34  int size() override;
35  void insert(Activity* activity) override;
36  Activity* pop() override;
37  Activity* front() override;
38 
39 
40 private:
41  std::string message;
42 
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:54
int size() override
Returns the number of activities in the queue.
Definition: uninitializedQueue.cc:36
Always uninitialized queue.
Definition: uninitializedQueue.h:24
Activity * front() override
Returns the next activity.
Definition: uninitializedQueue.cc:54
Base Class for a queue of Activities.
Definition: activityQueue.h:22
bool empty() override
Returns true if the queue is empty.
Definition: uninitializedQueue.cc:30
Activity * pop() override
Remove and return the next activity.
Definition: uninitializedQueue.cc:48
void insert(Activity *activity) override
Insert a new activity into the queue.
Definition: uninitializedQueue.cc:42