quantities/CommoditySet.h

Go to the documentation of this file.
00001 //============================================================================
00002 // Author      : Alessandro Pinto <apinto@eecs.berkeley.edu>
00003 //               University of California, Berkeley
00004 //               545 Cory Hall, Berkeley, CA 94720
00005 // Copyright   : See COPYING file that comes with this distribution
00006 //============================================================================
00007 
00008 #ifndef COMMODITYSET_H_
00009 #define COMMODITYSET_H_
00010 
00011 #include <algorithm>
00012 #include <set>
00013 #include "../core/Quantity.h"
00014 #include "Commodity.h"
00015 
00016 namespace cosi {
00017 
00018 class CommoditySet : public cosi::Quantity {
00019         std::set<Commodity> mCommoditySet;
00020 public:
00021 
00022         typedef std::set<Commodity>::iterator iterator;
00023 
00024         CommoditySet();
00025         virtual ~CommoditySet();
00026 
00027         iterator Begin() const ;
00028 
00029         iterator End() const ;
00030 
00031         int Size();
00032 
00033         CommoditySet Get() const;
00034 
00035         void Set(CommoditySet pSet);
00036 
00037         std::set<Commodity> GetValue() const ;
00038 
00039         void SetValue(std::set<Commodity> pSet);
00040 
00041         double GetAggregateBandwidthValue() ;
00042 
00043         Bandwidth GetAggregateBandwidth();
00044 
00045         void Add(Commodity pT);
00046 
00047         bool operator<(const CommoditySet &pSet) const;
00048 
00049         bool operator==(const CommoditySet &pSet) const;
00050 
00051         CommoditySet operator+(CommoditySet pSet);
00052 
00053         friend std::ostream& operator <<(std::ostream &pOs, const CommoditySet &pC);
00054 
00055         static std::string sQuantityName;
00056         static std::string sQuantityType;
00057 
00058 };
00059 
00060 }
00061 
00062 #endif /*COMMODITYSET_H_*/

Generated on Sun Sep 7 18:37:43 2008 for COSI by  doxygen 1.5.4
Contact 
©2002-2018 U.C. Regents