SST  9.0.0
StructuralSimulationToolkit
activityQueue.h
1 // Copyright 2009-2019 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-2019, 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_ACTIVITYQUEUE_H
14 #define SST_CORE_ACTIVITYQUEUE_H
15 
16 #include <sst/core/activity.h>
17 
18 namespace SST {
19 
20 /** Base Class for a queue of Activities
21  */
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 
42 } //namespace SST
43 
44 #endif // SST_CORE_ACTIVITYQUEUE_H
Base class for all Activities in the SST Event Queue.
Definition: activity.h:54
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:22
virtual int size()=0
Returns the number of activities in the queue.