CSimRobotDocument Class Reference

#include <SimRobotDocument.h>

List of all members.

Public Member Functions

void OnIdle ()
void OnSimReset ()
void OnSimStart ()
void OnSimStep ()
void Compile ()
void OnMouseClick (const CLICKINFO &)
void OnMouseDoubleClick (const CLICKINFO &)
void OnBeginDrag (const CLICKINFO &)
void OnDrag (const CLICKINFO &)
void OnEndDrag (const CLICKINFO &)
BOOL IsRunning ()
void SetFilePath (CString path)
SIMULATIONGetSimulation ()
STRING GetSelectedObject ()
void NewSection (const STRING &sSection)
void WriteString (const STRING &sName, const STRING &sValue)
void WriteInt (const STRING &sName, int nValue)
STRING ReadString (const STRING &sName)
int ReadInt (const STRING &sName)
 CSimRobotDocument ()
virtual ~CSimRobotDocument ()
CONTROLLERGetController ()
void activateSwitch (SensorData::sensors sensor, bool activate=true)
bool isSwitchActivated (SensorData::sensors sensor) const

Public Attributes

CSimulatorObjectViewerDlgBarpSimulatorObjectViewerDlgBar

Private Member Functions

virtual void UpdateFrameCounts ()
int GetNumberFromWindow (CWnd *pWnd)
CView * GetViewFromNumber (int n)
void GenerateSceneFile (const CString &from, const CString &to)

Private Attributes

BOOL m_bRunning
BOOL m_bStep
CONTROLLERm_pController
SIMULATIONm_pSim
CString m_sStatusMessage
STRING m_sSection
CMapStringToPtr m_map
CString m_filePath


Detailed Description

Definition at line 24 of file SimRobotDocument.h.


Constructor & Destructor Documentation

CSimRobotDocument::CSimRobotDocument (  ) 

Definition at line 33 of file SimRobotDocument.cpp.

References FALSE, m_bRunning, m_bStep, m_pController, m_pSim, m_sStatusMessage, and pSimulatorObjectViewerDlgBar.

CSimRobotDocument::~CSimRobotDocument (  )  [virtual]

Definition at line 43 of file SimRobotDocument.cpp.

References m_pController, m_pSim, and CONTROLLER::OnDestroy().


Member Function Documentation

void CSimRobotDocument::activateSwitch ( SensorData::sensors  sensor,
bool  activate = true 
) [inline]

Activates or diactivates a certain switch on the robot.

Parameters:
sensor The switch. Allowed values are: headBack, headFront, mouth, chin, and back.
activate Decides whether to activate or deactivate the switch.

Definition at line 72 of file SimRobotDocument.h.

References CONTROLLER::activateSwitch(), and m_pController.

Referenced by CSimulatedRobotsToolBar::handleCommand().

void CSimRobotDocument::Compile (  ) 

Definition at line 64 of file SimRobotDocument.cpp.

References CONNECTION::CreateController(), ErrorMessage, GenerateSceneFile(), SIM3DElement::GetName(), SIMULATION::GetObject(), m_filePath, m_pController, CONNECTION::m_pNext, CONNECTION::m_pScene, m_pSim, m_sStatusMessage, pStart, sim3DErrorOutputOff(), sim3DErrorOutputOn(), and sim3DTakeLastError().

Referenced by OnSimReset().

void CSimRobotDocument::GenerateSceneFile ( const CString &  from,
const CString &  to 
) [private]

Definition at line 112 of file SimRobotDocument.cpp.

References CRobotControlSimulatedRobots::activeWithImages, CRobotControlSimulatedRobots::activeWithoutImages, getSimulatedRobots(), CRobotControlSimulatedRobots::getState(), and CRobotControlSimulatedRobots::passive.

Referenced by Compile().

CONTROLLER* CSimRobotDocument::GetController (  )  [inline]

Definition at line 63 of file SimRobotDocument.h.

References m_pController.

int CSimRobotDocument::GetNumberFromWindow ( CWnd *  pWnd  )  [private]

STRING CSimRobotDocument::GetSelectedObject (  ) 

Definition at line 143 of file SimRobotDocument.cpp.

SIMULATION* CSimRobotDocument::GetSimulation (  )  [inline]

Definition at line 54 of file SimRobotDocument.h.

References m_pSim.

Referenced by CONTROLLER::CONTROLLER(), and CSimulatorObjectViewerDlgBar::DoDraw().

CView* CSimRobotDocument::GetViewFromNumber ( int  n  )  [private]

BOOL CSimRobotDocument::IsRunning (  ) 

Definition at line 189 of file SimRobotDocument.cpp.

References m_bRunning.

Referenced by CSimulatedRobotsToolBar::handleCommand(), and CRobotControlSimulatedRobots::stop().

bool CSimRobotDocument::isSwitchActivated ( SensorData::sensors  sensor  )  const [inline]

The function checks whether a certain switch is activated.

Parameters:
sensor The switch to check.
Returns:
Activated or not?

Definition at line 80 of file SimRobotDocument.h.

References CONTROLLER::isSwitchActivated(), and m_pController.

Referenced by CSimulatedRobotsToolBar::updateUI().

void CSimRobotDocument::NewSection ( const STRING sSection  ) 

Definition at line 148 of file SimRobotDocument.cpp.

References m_map, and m_sSection.

void CSimRobotDocument::OnBeginDrag ( const CLICKINFO  ) 

Definition at line 308 of file SimRobotDocument.cpp.

References m_pController, and CONTROLLER::OnBeginDrag().

Referenced by CSimulatorObjectViewerDlgBar::OnLButtonDown().

void CSimRobotDocument::OnDrag ( const CLICKINFO  ) 

Definition at line 314 of file SimRobotDocument.cpp.

References m_pController, and CONTROLLER::OnDrag().

Referenced by CSimulatorObjectViewerDlgBar::OnMouseMove().

void CSimRobotDocument::OnEndDrag ( const CLICKINFO  ) 

Definition at line 320 of file SimRobotDocument.cpp.

References m_pController, and CONTROLLER::OnEndDrag().

Referenced by CSimulatorObjectViewerDlgBar::OnDestroy(), and CSimulatorObjectViewerDlgBar::OnLButtonUp().

void CSimRobotDocument::OnIdle (  ) 

Definition at line 244 of file SimRobotDocument.cpp.

References SIMULATION::DoTimeStep(), FALSE, m_bRunning, m_bStep, m_pController, m_pSim, m_sStatusMessage, pSimulatorObjectViewerDlgBar, CSimulatorObjectViewerDlgBar::Repaint(), CONTROLLER::SetActors(), and sim3DTakeLastError().

Referenced by CRobotControlSimulatedRobots::onIdle().

void CSimRobotDocument::OnMouseClick ( const CLICKINFO  ) 

Definition at line 296 of file SimRobotDocument.cpp.

References m_pController, and CONTROLLER::OnMouseClick().

Referenced by CSimulatorObjectViewerDlgBar::OnLButtonDown().

void CSimRobotDocument::OnMouseDoubleClick ( const CLICKINFO  ) 

Definition at line 302 of file SimRobotDocument.cpp.

References m_pController, and CONTROLLER::OnMouseDoubleClick().

Referenced by CSimulatorObjectViewerDlgBar::OnLButtonDblClk().

void CSimRobotDocument::OnSimReset (  ) 

Definition at line 194 of file SimRobotDocument.cpp.

References BOOL(), Compile(), FALSE, m_bRunning, m_pController, m_pSim, CONTROLLER::OnDestroy(), and sim3DTakeLastError().

Referenced by CRobotControlSimulatedRobots::create(), CRobotControlSimulatedRobots::OnSimReset(), OnSimStart(), and OnSimStep().

void CSimRobotDocument::OnSimStart (  ) 

Definition at line 219 of file SimRobotDocument.cpp.

References FALSE, m_bRunning, m_pSim, OnSimReset(), and TRUE.

Referenced by CRobotControlSimulatedRobots::OnSimStart(), and CRobotControlSimulatedRobots::stop().

void CSimRobotDocument::OnSimStep (  ) 

Definition at line 233 of file SimRobotDocument.cpp.

References m_bRunning, m_bStep, m_pSim, OnSimReset(), and TRUE.

Referenced by CRobotControlSimulatedRobots::OnSimStep().

int CSimRobotDocument::ReadInt ( const STRING sName  ) 

Definition at line 179 of file SimRobotDocument.cpp.

References ReadString().

STRING CSimRobotDocument::ReadString ( const STRING sName  ) 

Definition at line 173 of file SimRobotDocument.cpp.

References m_sSection.

Referenced by ReadInt().

void CSimRobotDocument::SetFilePath ( CString  path  )  [inline]

Definition at line 53 of file SimRobotDocument.h.

References m_filePath.

Referenced by CRobotControlSimulatedRobots::create().

void CSimRobotDocument::UpdateFrameCounts (  )  [private, virtual]

Definition at line 292 of file SimRobotDocument.cpp.

void CSimRobotDocument::WriteInt ( const STRING sName,
int  nValue 
)

Definition at line 166 of file SimRobotDocument.cpp.

References WriteString().

void CSimRobotDocument::WriteString ( const STRING sName,
const STRING sValue 
)

Definition at line 161 of file SimRobotDocument.cpp.

References m_sSection.

Referenced by WriteInt().


Member Data Documentation

BOOL CSimRobotDocument::m_bRunning [private]

Definition at line 27 of file SimRobotDocument.h.

Referenced by CSimRobotDocument(), IsRunning(), OnIdle(), OnSimReset(), OnSimStart(), and OnSimStep().

BOOL CSimRobotDocument::m_bStep [private]

Definition at line 27 of file SimRobotDocument.h.

Referenced by CSimRobotDocument(), OnIdle(), and OnSimStep().

CString CSimRobotDocument::m_filePath [private]

Definition at line 40 of file SimRobotDocument.h.

Referenced by Compile(), and SetFilePath().

CMapStringToPtr CSimRobotDocument::m_map [private]

Definition at line 35 of file SimRobotDocument.h.

Referenced by NewSection().

CONTROLLER* CSimRobotDocument::m_pController [private]

Definition at line 29 of file SimRobotDocument.h.

Referenced by activateSwitch(), Compile(), CSimRobotDocument(), GetController(), isSwitchActivated(), OnBeginDrag(), OnDrag(), OnEndDrag(), OnIdle(), OnMouseClick(), OnMouseDoubleClick(), OnSimReset(), and ~CSimRobotDocument().

SIMULATION* CSimRobotDocument::m_pSim [private]

Definition at line 30 of file SimRobotDocument.h.

Referenced by Compile(), CSimRobotDocument(), GetSimulation(), OnIdle(), OnSimReset(), OnSimStart(), OnSimStep(), and ~CSimRobotDocument().

STRING CSimRobotDocument::m_sSection [private]

Definition at line 32 of file SimRobotDocument.h.

Referenced by NewSection(), ReadString(), and WriteString().

CString CSimRobotDocument::m_sStatusMessage [private]

Definition at line 31 of file SimRobotDocument.h.

Referenced by Compile(), CSimRobotDocument(), and OnIdle().

CSimulatorObjectViewerDlgBar* CSimRobotDocument::pSimulatorObjectViewerDlgBar

Definition at line 64 of file SimRobotDocument.h.

Referenced by CSimRobotDocument(), CSimulatorObjectViewerDlgBar::CSimulatorObjectViewerDlgBar(), OnIdle(), and CRobotControlSimulatedRobots::OnSimReset().


The documentation for this class was generated from the following files:
Generated on Thu Dec 7 01:25:07 2006 for DT2005.panorama by  doxygen 1.4.7