SST  12.0.0
StructuralSimulationToolkit
activityQueue.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_ACTIVITYQUEUE_H
13 #define SST_CORE_ACTIVITYQUEUE_H
14 
15 #include "sst/core/activity.h"
16 
17 namespace SST {
18 
19 /** Base Class for a queue of Activities
20  */
22 {
23 public:
24  ActivityQueue() {}
25  virtual ~ActivityQueue() {}
26 
27  /** Returns true if the queue is empty */
28  virtual bool empty() = 0;
29  /** Returns the number of activities in the queue */
30  virtual int size() = 0;
31  /** Remove and return the next activity */
32  virtual Activity* pop() = 0;
33  /** Insert a new activity into the queue */
34  virtual void insert(Activity* activity) = 0;
35  /** Returns the next activity */
36  virtual Activity* front() = 0;
37 
38 private:
39 };
40 
41 } // namespace SST
42 
43 #endif // SST_CORE_ACTIVITYQUEUE_H
Base class for all Activities in the SST Event Queue.
Definition: activity.h:46
virtual bool empty()=0
Returns true if the queue is empty.
virtual void insert(Activity *activity)=0
Insert a new activity into the queue.
virtual Activity * front()=0
Returns the next activity.
virtual Activity * pop()=0
Remove and return the next activity.
Base Class for a queue of Activities.
Definition: activityQueue.h:21
virtual int size()=0
Returns the number of activities in the queue.