summaryrefslogtreecommitdiffstats
path: root/source/Concept/Framework/robot.cpp
blob: 768554ed83f0e1f74b6d6883ad537a6aab4aa57e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include "robot.h"

//-----------------------------------------------------------------------------
Robot::~Robot()
{
	while(!modules.empty())
	{
		moduleMap::iterator iter = modules.begin();
		delete iter->second;
		modules.erase(iter);
	}
}

//-----------------------------------------------------------------------------
bool Robot::AddModule(IO_Module* newModule)
{
	moduleMap::iterator itr = modules.find(newModule->GetId());
	if(itr != modules.end())
		return false;

	modules[newModule->GetId()] = newModule;
	return true;
}

//-----------------------------------------------------------------------------
bool Robot::RemoveModule(IO_Module* oldModule)
{
	return RemoveModule(oldModule->GetId());
}

//-----------------------------------------------------------------------------
void Robot::Update()
{
	//insert code here
}

//--- EOF ---