#ifdef POSITION
/*
 * $Id$
 *
 * [ Description ]
 * 
 */

#include "Behavioural/include/Position.h"

namespace morpheo              {
namespace behavioural          {

  Entity * Position::find_entity (string name)
  {

    if (_entity->_name == name)
      return _entity;
    else
      if (_list_component->empty()== false)
	{
	  list<Entity *>::iterator i = _list_component->begin();
	  
	  while (i != _list_component->end())
	    {
	      if ((*i)->_name == name)
		{
		  return  *i;
		  break;
		}
	      ++i;
	    }
	}

    return NULL;
  };

}; // end namespace behavioural          
}; // end namespace morpheo              
#endif
