|
quantities/Thread.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 THREAD_H_ 00009 #define THREAD_H_ 00010 00011 #include <iostream> 00012 #include <string> 00013 #include "core/Quantity.h" 00014 00015 namespace cosi { 00016 00033 class Thread : public cosi::Quantity { 00035 std::string mThreadName; 00037 std::string mDestinationNodeName; 00039 int mDestId; 00041 std::string mDestinationThreadName; 00043 double mPeriod; 00045 int mMsgLength; 00046 public: 00048 Thread(); 00050 ~Thread(); 00051 00053 Thread Get(); 00054 00056 void Set(Thread pT); 00057 00059 std::string GetThreadName() const; 00060 00062 void SetThreadName(std::string pName); 00063 00065 std::string GetDestinationThreadName() const ; 00066 00068 void SetDestinationThreadName(std::string pName); 00069 00071 std::string GetDestinationNodeName() const ; 00072 00074 void SetDestinationNodeName(std::string pName); 00075 00077 int GetDestinationNodeId() const; 00078 00080 void SetDestinationNodeId(int pId); 00081 00083 double GetPeriod() const; 00084 00086 void SetPeriod(double pPeriod); 00087 00089 int GetMessageLength() const; 00090 00092 void SetMessageLength(int pMessageLength); 00093 00094 Thread& operator=(const Thread& pT) ; 00095 00096 bool operator<(const Thread &pT) const; 00097 00098 bool operator==(const Thread &pT) const; 00099 00100 friend std::ostream& operator<<(std::ostream &pOs , const Thread &pT) ; 00101 00102 }; 00103 00104 } 00105 00106 #endif /*THREAD_H_*/ Generated on Sun Sep 7 18:37:43 2008 for COSI by 1.5.4 |