diff options
Diffstat (limited to 'source/Concept/Framework/robot.cpp')
-rw-r--r-- | source/Concept/Framework/robot.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/source/Concept/Framework/robot.cpp b/source/Concept/Framework/robot.cpp new file mode 100644 index 0000000..768554e --- /dev/null +++ b/source/Concept/Framework/robot.cpp @@ -0,0 +1,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 ---
\ No newline at end of file |