#ifndef COMMODITY_H_
#define COMMODITY_H_

#include "../core/Quantity.h"
#include "Bandwidth.h"
#include "RealLatency.h"

namespace cosi {

class Commodity : public cosi::Quantity {
	std::string mSourceName;
	std::string mDestName;
	int mSourceId;
	int mDestId;
	Bandwidth mAverageBandwidth;
	RealLatency mMaximumLatency ;
public:
	Commodity();
	virtual ~Commodity();

	void Set(Commodity C);
	Commodity Get();

	void SetValue(std::string SourceName, std::string DestName, int SourceId,
			int DestId, Bandwidth AverageBandwidth , RealLatency L );

	void SetValue(std::string SourceName, std::string DestName, int SourceId,
			int DestId, double AverageBandwidthValue , double Lvalue);

	std::string GetSourceName()const ;
	std::string GetDestName()const ;
	int GetSourceId()const ;
	int GetDestId()const ;
	Bandwidth GetAverageBandwidth()const ;
	RealLatency GetMaximumLatency() const ;
	double GetAverageBandwidthValue();
	double GetMaximumLatencyValue() ;

	bool operator<(const Commodity &pC) const ;

	bool operator==(const Commodity &pC)const ;

	Commodity operator+(Commodity pC);

	friend std::ostream& operator <<(std::ostream &pOs, const Commodity &pC);

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

};

}

#endif /*COMMODITY_H_*/
