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

#include "Behavioural/include/Interfaces.h"

namespace morpheo              {
namespace behavioural          {

#undef  FUNCTION
#define FUNCTION "Interfaces::toXML"
  XML Interfaces::toXML (void)
  {
    log_printf(FUNC,Behavioural,FUNCTION,"Begin");

    XML xml ("interfaces");
    
    if (_list_interface->empty()== false)
      {
	list<Interface_fifo*>::iterator i     = _list_interface->begin();

	while (i != _list_interface->end())
	  {
	    xml.  insert_XML ((*i)->toXML());
	    ++i;
	  }
      }
  
    log_printf(FUNC,Behavioural,FUNCTION,"End");   
    return xml;
  };

#undef  FUNCTION
#define FUNCTION "Interfaces::toXML_mapping"
  XML Interfaces::toXML_mapping (void)
  {
    log_printf(FUNC,Behavioural,FUNCTION,"Begin");

    XML xml ("interfaces");
    
    if (_list_interface->empty()== false)
      {
	list<Interface_fifo*>::iterator i     = _list_interface->begin();

	while (i != _list_interface->end())
	  {
	    xml.  insert_XML ((*i)->toXML_mapping());
	    ++i;
	  }
      }
  
    log_printf(FUNC,Behavioural,FUNCTION,"End");   
    return xml;
  };
}; // end namespace behavioural          
}; // end namespace morpheo              
#endif
