#ifndef COMMODITYSET_H_
#define COMMODITYSET_H_

#include <algorithm>
#include <set>
#include "../core/Quantity.h"
#include "Commodity.h"

namespace cosi {

class CommoditySet : public cosi::Quantity {
public:
	std::set<Commodity> mCommoditySet;


	typedef std::set<Commodity>::iterator iterator;

	CommoditySet();
	virtual ~CommoditySet();

	iterator Begin() const ;

	iterator End() const ;

	int Size();

	CommoditySet Get() const;

	void Set(CommoditySet pSet);

	std::set<Commodity> GetValue() const ;

	void SetValue(std::set<Commodity> pSet);

	double GetAggregateBandwidthValue() ;

	Bandwidth GetAggregateBandwidth();

	void Add(Commodity pT);

	bool operator<(const CommoditySet &pSet) const;

	bool operator==(const CommoditySet &pSet) const;

	CommoditySet operator+(CommoditySet pSet);

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

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

};

}

#endif /*COMMODITYSET_H_*/
