SST  14.1.0
StructuralSimulationToolkit
action.h
1 // Copyright 2009-2024 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-2024, 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_ACTION_H
13 #define SST_CORE_ACTION_H
14 
15 #include "sst/core/activity.h"
16 #include "sst/core/output.h"
17 #include "sst/core/serialization/serializer.h"
18 
19 #include <cinttypes>
20 
21 namespace SST {
22 
23 /**
24  * An Action is a schedulable Activity which is not an Event.
25  */
26 class Action : public Activity
27 {
28 public:
29  Action() {}
30  ~Action() {}
31 
32  bool isAction() final { return true; }
33 
34 protected:
35  /** Called to signal to the Simulation object to end the simulation */
36  void endSimulation();
37 
38  /** Called to signal to the Simulation object to end the simulation
39  * @param end Simulation cycle when the simulation finishes
40  */
41  void endSimulation(SimTime_t end);
42 
43  void serialize_order(SST::Core::Serialization::serializer& ser) override;
45 };
46 
47 } // namespace SST
48 
49 #endif // SST_CORE_ACTION_H
An Action is a schedulable Activity which is not an Event.
Definition: action.h:26
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:43
Base class for all Activities in the SST Event Queue.
Definition: activity.h:46
Definition: action.cc:18
ImplementVirtualSerializable(SST::Activity) void setQueueOrder(uint64_t order)
Set a new Queue order.
Definition: activity.h:209
void endSimulation()
Called to signal to the Simulation object to end the simulation.
Definition: action.cc:21