SST 15.0
Structural Simulation Toolkit
pollingLinkQueue.h
1// Copyright 2009-2025 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-2025, 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_POLLINGLINKQUEUE_H
13#define SST_CORE_POLLINGLINKQUEUE_H
14
15#include "sst/core/activityQueue.h"
16
17#include <set>
18
19namespace SST {
20
21/**
22 * A link queue which is used for polling only.
23 */
24class PollingLinkQueue : public ActivityQueue
25{
26public:
27 PollingLinkQueue() = default;
28 ~PollingLinkQueue();
29
30 bool empty() override;
31 int size() override;
32 void insert(Activity* activity) override;
33 Activity* pop() override;
34 Activity* front() override;
35
36 void serialize_order(SST::Core::Serialization::serializer& ser);
37
38private:
39 std::multiset<Activity*, Activity::less<true, false, false>> data;
40};
41
42} // namespace SST
43
44#endif // SST_CORE_POLLINGLINKQUEUE_H
Base class for all Activities in the SST Event Queue.
Definition activity.h:46
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition serializer.h:45
void insert(Activity *activity) override
Insert a new activity into the queue.
Definition pollingLinkQueue.cc:40
bool empty() override
Returns true if the queue is empty.
Definition pollingLinkQueue.cc:28
Activity * pop() override
Remove and return the next activity.
Definition pollingLinkQueue.cc:46
int size() override
Returns the number of activities in the queue.
Definition pollingLinkQueue.cc:34
Activity * front() override
Returns the next activity.
Definition pollingLinkQueue.cc:56