00001 #ifndef _ControlCenter_txx
00002 #define _ControlCenter_txx
00003
00004 #include "ControlCenter.h"
00005 namespace mial{
00006 template<class Type, int nDims>
00007 ControlCenter<Type,nDims>::ControlCenter()
00008 {
00009 numBehaviors = 0;
00010 behaviorToRun = NULL;
00011 behaviorToRunStruct = NULL;
00012 behaviorToRunStream = NULL;
00013 }
00014
00015
00016 template<class Type, int nDims>
00017 ControlCenter<Type,nDims>::~ControlCenter()
00018 {
00019
00020 }
00021 template<class Type, int nDims>
00022 Behavior<Type,nDims>* ControlCenter<Type,nDims>::findBehavior(const std::string name)
00023 {
00024
00025 for(int i=0; i<numBehaviors; i++)
00026 {
00027 if( name.compare(behaviorList[i]->getName()) == 0 )
00028 {
00029 return behaviorList[i];
00030 }
00031 }
00032 return NULL;
00033 }
00034
00035
00036 template<class Type, int nDims>
00037 bool ControlCenter<Type,nDims>::addBehavior(Behavior<Type,nDims>* b)
00038 {
00039 if(b != NULL)
00040 {
00041 typename Behavior<Type,nDims>::Pointer bp = b;
00042 behaviorList.push_back(bp);
00043 numBehaviors++;
00044 return true;
00045 }
00046 else
00047 return false;
00048 }
00049 }
00050 #endif