VPTissue Reference Manual
SimPT_Shell::Session::SimSessionCoupled Class Reference

Collection of instances associated with an opened/running coupled project. More...

#include <SimSessionCoupled.h>

Inheritance diagram for SimPT_Shell::Session::SimSessionCoupled:
Inheritance graph
Collaboration diagram for SimPT_Shell::Session::SimSessionCoupled:
Collaboration graph

Public Slots

virtual void TimeStep ()
 

Signals

void ExecuteWorkUnit ()
 
- Signals inherited from SimShell::Session::ISession
void ErrorMessage (const std::string &error)
 Emitted when an error in a time step occurred (Multithreading cannot return bool directly in ProjectBase::TimeStep(), as the computation is queued for another thread) More...
 
void InfoMessage (const std::string &message, const InfoMessageReason &reason)
 Emitted when an event with an accompanying info message has been done/occurred (Multithreading cannot return bool directly in ProjectBase::TimeStep(), as the computation is queued for another thread) More...
 

Public Member Functions

 SimSessionCoupled (const std::shared_ptr< MergedPreferences > &prefs, const ptree &project_info, const std::shared_ptr< SimShell::Ws::IWorkspace > &workspaceModel)
 Constructor. More...
 
virtual ~SimSessionCoupled ()
 Destructor virtual, just in case.
 
virtual std::shared_ptr< RootViewerTypeCreateRootViewer (SimShell::Gui::Controller::AppController *parent=nullptr)
 
virtual void ForceExport ()
 
virtual ExportersType GetExporters ()
 
virtual const ptree & GetParameters () const
 
std::string GetStatusMessage () const
 Return the status message.
 
virtual Timings GetTimings () const
 Get timing information from simulation and viewers.
 
virtual void RefreshPreferences ()
 
virtual void SetParameters (const ptree &)
 
virtual void StartSimulation (int steps=-1)
 
virtual void StopSimulation ()
 
- Public Member Functions inherited from SimShell::Session::ISession
virtual ~ISession ()
 Virtual destructor for interface class.
 
virtual void SetParameters (const boost::property_tree::ptree &)=0
 Set simulation parameters.
 
virtual void TimeStep ()=0
 Perform 1 simulation step, bringing simulation into the "next" state. More...
 
- Public Member Functions inherited from SimPT_Sim::ClockMan::Timeable<>
virtual ~Timeable ()
 Destructor virtual for polymorphic class.
 

Additional Inherited Members

- Public Types inherited from SimShell::Session::ISession
using ExportCallbackType = std::function< void(const std::string &)>
 
using ExportersType = std::vector< std::pair< std::string, ExporterType >>
 
enum  InfoMessageReason { Stepped, Started, Stopped, Terminated }
 Enumeration for the reason of an emitted InfoMessage from the project.
 
using RootViewerType = Viewer::IViewerNode
 
- Public Types inherited from SimPT_Sim::ClockMan::Timeable<>
using Timings = typename ClockTraits< std::chrono::system_clock, typename std::chrono::system_clock::duration >::CumulativeTimings
 
- Public Types inherited from SimPT_Sim::ClockMan::ClockTraits< std::chrono::system_clock, typename std::chrono::system_clock::duration >
using Clock = std::chrono::system_clock
 Type for clock.
 
using CumulativeTimings = SimPT_Sim::ClockMan::CumulativeRecords< typename std::chrono::system_clock::duration >
 Records with cumulative timing info.
 
using Duration = typename std::chrono::system_clock::duration
 Type for time duration units.
 
using IndividualTimings = SimPT_Sim::ClockMan::IndividualRecords< typename std::chrono::system_clock::duration >
 Records with individual timing info.
 
using Stopclock = SimPT_Sim::ClockMan::Stopwatch< std::chrono::system_clock >
 Stopwatch to measure time durations.
 

Detailed Description

Collection of instances associated with an opened/running coupled project.

Owner of Sim object and viewers.

Definition at line 42 of file SimSessionCoupled.h.

Constructor & Destructor Documentation

SimPT_Shell::Session::SimSessionCoupled::SimSessionCoupled ( const std::shared_ptr< MergedPreferences > &  prefs,
const ptree &  project_info,
const std::shared_ptr< SimShell::Ws::IWorkspace > &  workspaceModel 
)

Constructor.

Parameters
directoryThe working directory of the project.
project_infoPtree with info to construct simulator from.
prefsInitial preferences for viewers.
workspaceModelWorkspace of sub projects of this coupled project.
Exceptions
Exceptionif unable to open project (e.g. due to wrong parameters).

Definition at line 54 of file SimSessionCoupled.cpp.

Member Function Documentation

std::shared_ptr< SimSessionCoupled::RootViewerType > SimPT_Shell::Session::SimSessionCoupled::CreateRootViewer ( SimShell::Gui::Controller::AppController parent = nullptr)
virtual
See also
Session::ISession

Implements SimShell::Session::ISession.

Definition at line 95 of file SimSessionCoupled.cpp.

void SimPT_Shell::Session::SimSessionCoupled::ForceExport ( )
virtual
See also
Session::ISession

Implements SimShell::Session::ISession.

Definition at line 141 of file SimSessionCoupled.cpp.

SimSessionCoupled::ExportersType SimPT_Shell::Session::SimSessionCoupled::GetExporters ( )
virtual
See also
Session::ISession

Implements SimShell::Session::ISession.

Definition at line 108 of file SimSessionCoupled.cpp.

const ptree & SimPT_Shell::Session::SimSessionCoupled::GetParameters ( ) const
virtual
See also
Session::ISession

Implements SimShell::Session::ISession.

Definition at line 114 of file SimSessionCoupled.cpp.

void SimPT_Shell::Session::SimSessionCoupled::SetParameters ( const ptree &  pt)
virtual
See also
Session::ISession

Definition at line 178 of file SimSessionCoupled.cpp.

References pt.

void SimPT_Shell::Session::SimSessionCoupled::StartSimulation ( int  steps = -1)
virtual
See also
Session::ISession

Implements SimShell::Session::ISession.

Definition at line 185 of file SimSessionCoupled.cpp.

References GetStatusMessage(), and SimShell::Session::ISession::InfoMessage().

Referenced by TimeStep().

Here is the call graph for this function:

Here is the caller graph for this function:

void SimPT_Shell::Session::SimSessionCoupled::StopSimulation ( )
virtual
See also
Session::ISession

Implements SimShell::Session::ISession.

Definition at line 216 of file SimSessionCoupled.cpp.

References GetStatusMessage(), and SimShell::Session::ISession::InfoMessage().

Here is the call graph for this function:

void SimPT_Shell::Session::SimSessionCoupled::TimeStep ( )
virtualslot
See also
Session::ISession

Definition at line 288 of file SimSessionCoupled.cpp.

References StartSimulation().

Here is the call graph for this function:


The documentation for this class was generated from the following files: