SST 15.0
Structural Simulation Toolkit
interactiveAction.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_INTERACTIVE_ACTION_H
13#define SST_CORE_INTERACTIVE_ACTION_H
14
15#include "sst/core/action.h"
16// Can include this because this header is not installed
17#include "sst/core/simulation_impl.h"
18
19#include <string>
20
21namespace SST {
22
23/**
24 \class InteractiveAction An event to trigger interactive mode. This
25 is a "one shot" event and will delete itself on execute()
26*/
27class InteractiveAction : public Action
28{
29public:
30 /**
31 Create a new InteractiveAction object for the simulation core to initiate interactive mode
32 */
33 InteractiveAction(Simulation_impl* sim, const std::string& msg) :
34 Action(),
35 sim_(sim),
36 msg_(msg)
37 {
38 setPriority(INTERACTIVEPRIOIRTY);
39 }
40
42
43 /** Called by TimeVortex to trigger interactive mode. */
44 void execute() override
45 {
46 sim_->enter_interactive_ = true;
47 sim_->interactive_msg_ = msg_;
48 delete this;
49 }
50
51private:
52 Simulation_impl* sim_;
53 std::string msg_;
54};
55
56} // namespace SST
57#endif // SST_CORE_INTERACTIVE_ACTION_H
void setPriority(uint64_t priority)
Set the priority of the Activity.
Definition activity.h:198
to trigger interactive mode.
Definition interactiveAction.h:28
InteractiveAction(Simulation_impl *sim, const std::string &msg)
Create a new InteractiveAction object for the simulation core to initiate interactive mode.
Definition interactiveAction.h:33
void execute() override
Called by TimeVortex to trigger interactive mode.
Definition interactiveAction.h:44
Main control class for a SST Simulation.
Definition simulation_impl.h:87