SST  8.0.0
StructuralSimulationToolkit
timeVortex.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_TIMEVORTEX_H
13 #define SST_CORE_TIMEVORTEX_H
14 
15 #include <sst/core/activityQueue.h>
16 #include <sst/core/module.h>
17 
18 namespace SST {
19 
20 class Output;
21 
22 /**
23  * Primary Event Queue
24  */
25 class TimeVortex : public ActivityQueue, public Module {
26 public:
27  TimeVortex() {
28  max_depth = MAX_SIMTIME_T;
29  }
30  ~TimeVortex() {}
31 
32  // Inherited from ActivityQueue
33  virtual bool empty() override = 0;
34  virtual int size() override = 0;
35  virtual void insert(Activity* activity) override = 0;
36  virtual Activity* pop() override = 0;
37  virtual Activity* front() override = 0;
38 
39  /** Print the state of the TimeVortex */
40  virtual void print(Output &out) const = 0;
41  virtual uint64_t getMaxDepth() const { return max_depth; }
42  virtual uint64_t getCurrentDepth() const = 0;
43 
44 
45 protected:
46  uint64_t max_depth;
47 
48 };
49 
50 } //namespace SST
51 
52 #endif // SST_CORE_TIMEVORTEX_H
Output object provides consistent method for outputting data to stdout, stderr and/or sst debug file...
Definition: output.h:54
virtual Activity * pop() override=0
Remove and return the next activity.
Base class for all Activities in the SST Event Queue.
Definition: activity.h:54
virtual Activity * front() override=0
Returns the next activity.
Primary Event Queue.
Definition: timeVortex.h:25
Module is a tag class used with the loadModule function.
Definition: module.h:20
Base Class for a queue of Activities.
Definition: activityQueue.h:22
virtual void insert(Activity *activity) override=0
Insert a new activity into the queue.
virtual int size() override=0
Returns the number of activities in the queue.
virtual bool empty() override=0
Returns true if the queue is empty.
virtual void print(Output &out) const =0
Print the state of the TimeVortex.