#ifndef _LINK_H_
#define _LINK_H_

#include <string>
#include "quantities/onchipcommunication/Interface.h"
#include "quantities/Name.h"

namespace cosi {

namespace library {

namespace onchipcommunication {

class _Link {
public:
	_Link();
	virtual ~_Link();

	/**\brief Sets the name of the source node.
	 *
	 * This is the name of the library element that can be a source for
	 * this link.*/
	void SetSource(Name pS);

	/**\brief Returns the name of the library element that can be the source of this link.*/
	Name GetSource();

	/**\brief Sets the name of the destination node.
	 *
	 * This is the name of the library element that can be a destination for
	 * this link.*/
	void SetDestination(Name pS);

	/**\brief Returns the name of the library elements that can be the destination of this link*/
	Name GetDestination();

	/**\brief Sets the type of the interface that can be the source interface of this link.
	 *
	 * The source node can have many interfaces. A link connectes one source interface to one
	 * destination interface.*/
	void SetSourceInterface(cosi::quantity::onchipcommunication::Interface pIf);

	/**\brief Returns that source interface of this link*/
	cosi::quantity::onchipcommunication::Interface GetSourceInterface();

	/**\brief Sets the type of the interface that can be the destination interface of this link.
	 *
	 * The destination node can have many interfaces. A link connectes one source interface to one
	 * destination interface.*/
	void SetDestinationInterface(
			cosi::quantity::onchipcommunication::Interface pIf);

	/**\brief Returns the destination interface of this node.*/
	cosi::quantity::onchipcommunication::Interface GetDestinationInterface();

	bool Directed();
	void Directed(bool pD);
private:
	/**\brief This field is true if the link is directed.*/
	bool mDirected;


	/**\brief The name of the source node of this link.*/
	Name mSource;

	/**\brief The name of the destination node of this link.*/
	Name mDest;

	/**\brief The type of the source interface of this link*/
	cosi::quantity::onchipcommunication::Interface mSourceInterface;

	/**\brief The type of the destination interface of this link.*/
	cosi::quantity::onchipcommunication::Interface mDestInterface;

};

}

}

}

#endif /*_LINK_H_*/
