2 #include "IMovableItemCallback.h"
3 #include "ISimGUICallback.h"
4 #include "IMotorizedJoint.h"
9 #include "IPhysicsMovableItem.h"
10 #include "IPhysicsBody.h"
12 #include "MovableItem.h"
34 #include "SimulationThread.h"
35 #include "SimulationMgr.h"
39 #include "RobotPartInterface.h"
46 SimulationMgr::SimulationMgr(
void)
50 SimulationMgr::~SimulationMgr(
void)
54 ShutdownAllSimulations();
57 {
Std_TraceMsg(0,
"Caught Error in desctructor of SimulationMgr\r\n",
"", -1,
false,
true);}
63 return g_SimMgrInstance;
68 g_lpActiveSim = lpActive;
76 SimulationThread *SimulationMgr::CreateSimulation(std::string strSimFile,
bool bForceNoWindows)
83 lpThread->StartSimulation(strSimFile, bForceNoWindows);
84 m_arySimThreads.Add(lpThread);
89 if(lpThread)
delete lpThread;
95 if(lpThread)
delete lpThread;
96 THROW_ERROR(Al_Err_lUnknownError, Al_Err_strUnknownError);
101 void SimulationMgr::ShutdownAllSimulations()
103 int iSize = m_arySimThreads.GetSize();
104 for(
int iIdx=0; iIdx<iSize; iIdx++)
105 m_arySimThreads[iIdx]->ShutdownSimulation();
107 m_arySimThreads.RemoveAll();
110 AnimatBase *SimulationMgr::FindByID(std::string strID,
bool bThrowError)
113 int iSize = m_arySimThreads.GetSize();
114 for(
int iIdx=0; iIdx<iSize; iIdx++)
116 Simulator *lpSim = m_arySimThreads[iIdx]->Sim();
118 lpFound = lpSim->
FindByID(strID,
false);
124 THROW_PARAM_ERROR(Al_Err_lIDNotFound, Al_Err_strIDNotFound,
"ID", strID);
Base class file for all Animat simulation objects.
Declares the nervous system class.
Declares the simulation recorder class.
Declares the Robot IO control interface base class.
Simulates the entire environment.
Root namespace for the base simulation library for AnimatLab.
Declares the body part class.
Information about the standard error.
static SimulationMgr & Instance()
Singleton accessor for this class.
Declares the link base class.
Declares the key frame class.
Declares the joint class.
Declares the organism class.
Declares the activated item class.
Declares a light manager object.
Declares the bounding box class.
virtual AnimatBase * FindByID(std::string strID, bool bThrowError=true)
Searches for the object with the specified ID.
void Std_TraceMsg(const int iLevel, std::string strMessage, std::string strSourceFile, int iSourceLine, bool bLogToFile, bool bPrintHeader)
Traces a message to the debugger window.
Declares the data chart manager class.
Declares the rigid body class.
Declares the structure class.
Declares the odor type class.
Declares the robotics inerface for animatlab.
Declares the simulator class.
Declares the neural module class.
Declares the activated item manager class.
Declares the external stimuli manager class.
Declares the receptive field class.