SST 12.1.0
Structural Simulation Toolkit
uninitializedQueue.h
1// Copyright 2009-2022 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-2022, 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
17namespace SST {
18
19/** Always uninitialized queue
20 * @brief Used for debugging, and preventing accidentally sending messages
21 * into an incorrect queue
22 */
24{
25public:
26 /** Create a new Queue
27 * @param message - Message to print when something attempts to use this Queue
28 */
29 UninitializedQueue(const 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
39private:
40 std::string message;
41};
42
43} // namespace SST
44
45#endif // SST_CORE_UNINITIALIZEDQUEUE_H
Base Class for a queue of Activities.
Definition: activityQueue.h:22
Base class for all Activities in the SST Event Queue.
Definition: activity.h:46
Always uninitialized queue.
Definition: uninitializedQueue.h:24
bool empty() override
Returns true if the queue is empty.
Definition: uninitializedQueue.cc:29
Activity * pop() override
Remove and return the next activity.
Definition: uninitializedQueue.cc:50
void insert(Activity *activity) override
Insert a new activity into the queue.
Definition: uninitializedQueue.cc:43
Activity * front() override
Returns the next activity.
Definition: uninitializedQueue.cc:57
int size() override
Returns the number of activities in the queue.
Definition: uninitializedQueue.cc:36