|
quantities/ThreadSet.hGo 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 THREADSET_H_ 00009 #define THREADSET_H_ 00010 00011 #include <string> 00012 #include <set> 00013 #include <algorithm> 00014 #include "core/Quantity.h" 00015 #include "quantities/Thread.h" 00016 00017 namespace cosi 00018 { 00019 00020 class ThreadSet : public cosi::Quantity 00021 { 00022 std::set<Thread> mSet ; 00023 public: 00024 00025 typedef std::set<Thread>::iterator iterator ; 00026 00027 ThreadSet(); 00028 00029 ~ThreadSet(); 00030 00031 ThreadSet Get() ; 00032 00033 void Set(ThreadSet pSet ) ; 00034 00035 std::set<Thread> GetValue() ; 00036 00037 void SetValue(std::set<Thread> pSet) ; 00038 00039 void AddThread(Thread pT); 00040 00041 int Size(); 00042 00043 Thread GetLongestMessage() ; 00044 00045 iterator ThreadSetBegin() ; 00046 00047 iterator ThreadSetEnd() ; 00048 00049 00050 bool operator<(ThreadSet pSet) ; 00051 00052 bool operator==(ThreadSet pSet) ; 00053 00054 ThreadSet operator+(ThreadSet pSet) ; 00055 00056 friend std::ostream& operator <<(std::ostream &pOs , const ThreadSet &pT) ; 00057 00058 static std::string sQuantityName; 00059 static std::string sQuantityType; 00060 }; 00061 00062 } 00063 00064 #endif /*THREADSET_H_*/ Generated on Sun Sep 7 18:37:43 2008 for COSI by 1.5.4 |