VPTissue Reference Manual
SimPT_Shell::Session::SimSession Class Reference

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

#include <SimSession.h>

Inheritance diagram for SimPT_Shell::Session::SimSession:
Inheritance graph
Collaboration diagram for SimPT_Shell::Session::SimSession:
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

 SimSession (const std::shared_ptr< MergedPreferences > &prefs, const ptree &sim)
 Initializes with a ptree description of the simulator state.
 
 SimSession (const std::shared_ptr< MergedPreferences > &prefs, const SimPT_Sim::SimState &sim)
 Initializes with a SimState description of the simulator state.
 
virtual ~SimSession ()
 Destructor virtual.
 
virtual std::shared_ptr< RootViewerTypeCreateRootViewer (SimShell::Gui::Controller::AppController *parent=nullptr)
 Return root viewer, i.e. the viewer that owns all other viewers.
 
virtual void ForceExport ()
 
virtual ExportersType GetExporters ()
 
virtual const ptree & GetParameters () const
 
virtual std::shared_ptr< SimPT_Sim::SimGetSim ()
 
virtual std::string GetStatusMessage () const
 
virtual Timings GetTimings () const
 Get timing information from simulation and viewers.
 
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 project.

Owner of Sim object, viewers and viewer windows.

Definition at line 51 of file SimSession.h.

Member Function Documentation

void SimPT_Shell::Session::SimSession::ForceExport ( )
virtual
See also
Session::ISimSession

Implements SimShell::Session::ISession.

Definition at line 167 of file SimSession.cpp.

const ptree & SimPT_Shell::Session::SimSession::GetParameters ( ) const
virtual
See also
Session::ISimSession

Implements SimShell::Session::ISession.

Definition at line 150 of file SimSession.cpp.

shared_ptr< SimPT_Sim::Sim > SimPT_Shell::Session::SimSession::GetSim ( )
virtual
See also
Session::ISimSession

Implements SimPT_Shell::Session::ISimSession.

Definition at line 91 of file SimSession.cpp.

string SimPT_Shell::Session::SimSession::GetStatusMessage ( ) const
virtual
See also
Session::ISimSession

Implements SimPT_Shell::Session::ISimSession.

Definition at line 155 of file SimSession.cpp.

void SimPT_Shell::Session::SimSession::SetParameters ( const ptree &  pt)
virtual
See also
Session::ISimSession

Definition at line 209 of file SimSession.cpp.

void SimPT_Shell::Session::SimSession::StartSimulation ( int  steps = -1)
virtual
See also
Session::ISimSession

Implements SimShell::Session::ISession.

Definition at line 217 of file SimSession.cpp.

void SimPT_Shell::Session::SimSession::StopSimulation ( )
virtual
See also
Session::ISimSession

Implements SimShell::Session::ISession.

Definition at line 251 of file SimSession.cpp.

void SimPT_Shell::Session::SimSession::TimeStep ( )
virtualslot
See also
Session::ISimSession

Definition at line 264 of file SimSession.cpp.


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