1 #ifndef LOGWINDOWVIEWER_H_INCLUDED
2 #define LOGWINDOWVIEWER_H_INCLUDED
42 LogWindowViewer(
const std::shared_ptr<SimShell::Ws::MergedPreferences>&,
47 template <
typename EventType>
48 void Update(
const EventType&);
51 std::shared_ptr<SimShell::Ws::MergedPreferences> m_preferences;
55 template<
typename EventType>
56 inline void LogWindowViewer::Update(
const EventType& e)
58 switch (e.GetType()) {
59 case SimPT_Sim::Event::SimEventType::Initialized:
61 m_app->Log(
"Initialized> path = " + m_preferences->GetPath());
64 case SimPT_Sim::Event::SimEventType::Stepped:
66 m_app->Log(
"Stepped> " + e.GetSource()->GetStatusMessage());
69 case SimPT_Sim::Event::SimEventType::Done:
71 m_app->Log(
"Done> path = " + m_preferences->GetPath());
74 case SimPT_Sim::Event::SimEventType::Forced:
76 m_app->Log(
"Forced> " + e.GetSource()->GetStatusMessage());
86 case SimPT_Sim::Event::SimEventType::Initialized:
88 m_app->Log(
"Initialized> path = " + m_preferences->GetPath());
91 case SimPT_Sim::Event::SimEventType::Stepped:
93 m_app->Log(
"Stepped> " + std::to_string(e.
GetSource()->GetSimStep()));
96 case SimPT_Sim::Event::SimEventType::Done:
98 m_app->Log(
"Done> path = " + m_preferences->GetPath());
101 case SimPT_Sim::Event::SimEventType::Forced:
103 m_app->Log(
"Forced> " + std::to_string(e.
GetSource()->GetSimStep()));
111 #endif // end_of_include_guard
Type GetType() const
Get Event type.
Interface for ViewerDockWidget.
Source GetSource() const
Get the data member value.
Namespace for SimPT shell package.
A viewer that displays sim events in a log in a dock window.
An event transmitted by a Coupled Simulator.
Definition for CoupledSimEvent.
see the online Qt documentation
Interface for CoupledSim.