SST  9.1.0
StructuralSimulationToolkit
timeVortex.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 #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 {
26 public:
27  SST_ELI_DECLARE_BASE(TimeVortex)
28  SST_ELI_DECLARE_INFO_EXTERN(ELI::ProvidesParams)
29  SST_ELI_DECLARE_CTOR_EXTERN(SST::Params&)
30 
31  TimeVortex() {
32  max_depth = MAX_SIMTIME_T;
33  }
34  ~TimeVortex() {}
35 
36  // Inherited from ActivityQueue
37  virtual bool empty() override = 0;
38  virtual int size() override = 0;
39  virtual void insert(Activity* activity) override = 0;
40  virtual Activity* pop() override = 0;
41  virtual Activity* front() override = 0;
42 
43  /** Print the state of the TimeVortex */
44  virtual void print(Output &out) const = 0;
45  virtual uint64_t getMaxDepth() const { return max_depth; }
46  virtual uint64_t getCurrentDepth() const = 0;
47 
48 
49 protected:
50  uint64_t max_depth;
51 
52 };
53 
54 } //namespace SST
55 
56 #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
Definition: paramsInfo.h:28
Parameter store.
Definition: params.h:45
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.