SST  6.1.0
StructuralSimulationToolkit
pollingLinkQueue.h
1 // Copyright 2009-2016 Sandia Corporation. Under the terms
2 // of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S.
3 // Government retains certain rights in this software.
4 //
5 // Copyright (c) 2009-2016, Sandia Corporation
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_POLLINGLINKQUEUE_H
13 #define SST_CORE_POLLINGLINKQUEUE_H
14 
15 #include <set>
16 
17 #include <sst/core/activityQueue.h>
18 
19 namespace SST {
20 
21 /**
22  * A link queue which is used for polling only.
23  */
25 public:
28 
29  bool empty();
30  int size();
31  void insert(Activity* activity);
32  Activity* pop();
33  Activity* front();
34 
35 
36 private:
37  std::multiset<Activity*,Activity::less_time> data;
38 
39 };
40 
41 } //namespace SST
42 
43 #endif // SST_CORE_POLLINGLINKQUEUE_H
Base class for all Activities in the SST Event Queue.
Definition: activity.h:53
Definition: action.cc:17
void insert(Activity *activity)
Insert a new activity into the queue.
Definition: pollingLinkQueue.cc:39
A link queue which is used for polling only.
Definition: pollingLinkQueue.h:24
Activity * pop()
Remove and return the next activity.
Definition: pollingLinkQueue.cc:44
int size()
Returns the number of activities in the queue.
Definition: pollingLinkQueue.cc:34
Activity * front()
Returns the next activity.
Definition: pollingLinkQueue.cc:53
bool empty()
Returns true if the queue is empty.
Definition: pollingLinkQueue.cc:29
Base Class for a queue of Activities.
Definition: activityQueue.h:22