#ifndef TRANSFERTABLE_H_
#define TRANSFERTABLE_H_

#include <iostream>
#include <string>
#include <map>
#include <algorithm>
#include "core/Quantity.h"

namespace cosi
{

class TransferTable : public cosi::Quantity
{
	std::map< std::pair<std::string,std::string> , std::string > mTable;
public:

	typedef std::map< std::pair<std::string,std::string> , std::string >::iterator iterator ;

	TransferTable();

	~TransferTable();

	TransferTable Get();

	void Set(TransferTable pT);

	std::map< std::pair<std::string,std::string> , std::string > GetValue() ;

	void SetValue(std::map< std::pair<std::string,std::string> , std::string > pTable) ;

	void AddEntry(std::string pSourceName, std::string pDestName , std::string pPortName);

	bool HasEntry(std::string pSourceName, std::string pDestName , std::string pPortName);

	bool HasEntry(std::string pSourceName, std::string pDestName );

	std::string GetPort(std::string pSourceName , std::string pDestName ) ;

	iterator TransferTableBegin();

	iterator TransferTableEnd();

	bool operator<(TransferTable pT) ;

	TransferTable operator+(TransferTable pT) ;

	friend std::ostream& operator <<(std::ostream &pOs, const TransferTable &pT) ;

	static std::string sQuantityName ;
	static std::string sQuantityType ;

};

}

#endif /*TRANSFERTABLE_H_*/
