/*******************************************************************
*
*  DESCRIPTION: PortList
*
*  AUTHOR:    Daniel Rodriguez.
*
*  EMAIL:     mailto://drodrigu@dc.uba.ar
*
*  DATE: 03/01/1999
*
*******************************************************************/

/** include files **/
#include "portlist.h"

const Port *getPort( VirtualPortList *pl, string name)
{
	VirtualPortList::iterator	cursor;

	for (	cursor = pl->begin();
		cursor != pl->end() && cursor->first != name;
		cursor++ )
			;

	MASSERTMSG( cursor != pl->end(), "The output port " + name + " is not defined with the LINK statement.\n");

	return cursor->second;
}
