AnimatLab  2
Test
SimulationThread.h
1 #pragma once
2 
3 namespace AnimatSim
4 {
5 
6  class ANIMAT_PORT SimulationThread : public ISimGUICallback
7  {
8  protected:
9  Simulator *m_lpSim;
10  bool m_bThreadProcessing;
11  bool m_bNeedToStop;
12 
13 #ifndef STD_DO_NOT_ADD_BOOST
14  boost::thread m_SimThread;
15 
16  boost::interprocess::interprocess_mutex m_WaitForInitEndMutex;
17  boost::interprocess::interprocess_condition m_WaitForInitEndCond;
18 
19  boost::interprocess::interprocess_mutex m_WaitForSimEndMutex;
20  boost::interprocess::interprocess_condition m_WaitForSimEndCond;
21 #endif
22 
23  virtual void ProcessSimulation();
24 
25  public:
26  SimulationThread(void);
27  virtual ~SimulationThread(void);
28 
29  virtual bool NeedToStopSim();
30  virtual Simulator *Sim();
31 
32  virtual void StartSimulation(std::string strSimFile, bool bForceNoWindows = false);
33  virtual void Simulate(float fltTime = -1, bool bBlocking = true, float fltWaitTime = -1);
34  virtual void PauseSimulation();
35  virtual void ResumeSimulation();
36  virtual void ResetSimulation();
37  virtual void StopSimulation();
38  virtual void ShutdownSimulation();
39  virtual void NeedToStopSimulation();
40  virtual void HandleNonCriticalError(std::string strError);
41  virtual void HandleCriticalError(std::string strError);
42  };
43 
44 }
Simulates the entire environment.
Definition: Simulator.h:31
Root namespace for the base simulation library for AnimatLab.
Callback methods for the simulation object.