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

#include "Behavioural/include/Position.h"

namespace morpheo              {
namespace behavioural          {

  XML Position::toXML (void)
  {
    XML xml (_entity->_name);
    
    xml.balise_open         ("description");
    xml.  insert_XML        (_entity->toXML());
    xml.  balise_open       ("architecture");

    if (_list_component->empty()== false)
      {
	list<Entity *>::iterator i = _list_component->begin();

	while (i != _list_component->end())
	  {
	    xml.insert_XML ((*i)->toXML_mapping());
	    ++i;
	  }
      }
	
    xml.  balise_close      ();
    xml.balise_close        ();
    
    return xml;
  };

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