/*
 * $Id$
 *
 * [ Description ]
 * 
 */

#include "Behavioural/include/Interfaces.h"

namespace morpheo              {
namespace behavioural          {

#undef  FUNCTION
#define FUNCTION "Interfaces::find_interface"
  Interface_fifo * Interfaces::find_interface (std::string name)
  {
    log_printf(FUNC,Behavioural,FUNCTION,"Begin");

    Interface_fifo * _return = NULL;
    if (_list_interface->empty()== false)
      {
	std::list<Interface_fifo*>::iterator i = _list_interface->begin();

	while (i != _list_interface->end())
	  {
	    if ((*i)->get_name() == name)
	      {
		_return = (*i);
		break;
	      }
	    ++i;
	  }
      }
    
    log_printf(FUNC,Behavioural,FUNCTION,"End"); 

    return _return;
  };

}; // end namespace behavioural          
}; // end namespace morpheo              
