SST  8.0.0
StructuralSimulationToolkit
initQueue.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 #ifndef SST_CORE_INITQUEUE_H
13 #define SST_CORE_INITQUEUE_H
14 
15 #include <deque>
16 
17 #include <sst/core/activityQueue.h>
18 
19 namespace SST {
20 
21 /**
22  * ActivityQueue for use during the init() phase
23  */
24 class InitQueue : public ActivityQueue {
25 public:
26  InitQueue();
27  ~InitQueue();
28 
29  bool empty() override;
30  int size() override;
31  void insert(Activity* activity) override;
32  Activity* pop() override;
33  Activity* front() override;
34 
35 private:
36  std::deque<Activity*> data;
37 
38 };
39 
40 } //namespace SST
41 
42 #endif // SST_CORE_INITQUEUE_H
bool empty() override
Returns true if the queue is empty.
Definition: initQueue.cc:29
ActivityQueue for use during the init() phase.
Definition: initQueue.h:24
Activity * pop() override
Remove and return the next activity.
Definition: initQueue.cc:44
Base class for all Activities in the SST Event Queue.
Definition: activity.h:54
Activity * front() override
Returns the next activity.
Definition: initQueue.cc:52
void insert(Activity *activity) override
Insert a new activity into the queue.
Definition: initQueue.cc:39
int size() override
Returns the number of activities in the queue.
Definition: initQueue.cc:34
Base Class for a queue of Activities.
Definition: activityQueue.h:22