Changeset 1533 for trunk/yat/utility/DataWeightProxy.cc
- Timestamp:
- Sep 25, 2008, 2:02:52 PM (14 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/utility/DataWeightProxy.cc
r1532 r1533 20 20 */ 21 21 22 #include "DataWeight .h"22 #include "DataWeightProxy.h" 23 23 24 24 namespace theplu { … … 26 26 namespace utility { 27 27 28 DataWeight ::DataWeight(double data, doubleweight)28 DataWeightProxy::DataWeightProxy(double& data, double& weight) 29 29 : data_(data), weight_(weight) {} 30 30 31 32 double& DataWeight::data(void) 31 double& DataWeightProxy::data(void) 33 32 { 34 33 return data_; … … 36 35 37 36 38 const double& DataWeight ::data(void) const37 const double& DataWeightProxy::data(void) const 39 38 { 40 39 return data_; 41 40 } 42 41 43 double& DataWeight::weight(void) 42 43 double& DataWeightProxy::weight(void) 44 44 { 45 45 return weight_; … … 47 47 48 48 49 const double& DataWeight ::weight(void) const49 const double& DataWeightProxy::weight(void) const 50 50 { 51 51 return weight_; 52 52 } 53 53 54 55 bool operator==(const DataWeight& lhs, const DataWeight& rhs)56 {57 return lhs.data() == rhs.data();58 }59 60 61 bool operator!=(const DataWeight& lhs, const DataWeight& rhs)62 {63 return ! (lhs == rhs);64 }65 66 67 bool operator<(const DataWeight& lhs, const DataWeight& rhs)68 {69 return lhs.data() < rhs.data();70 }71 72 73 bool operator>(const DataWeight& lhs, const DataWeight& rhs)74 {75 return rhs < lhs;76 }77 78 79 bool operator<=(const DataWeight& lhs, const DataWeight& rhs)80 {81 return rhs > lhs;82 }83 84 85 bool operator>=(const DataWeight& lhs, const DataWeight& rhs)86 {87 return rhs < lhs;88 }89 90 91 54 }}} // of namespace utility, yat, and theplu
Note: See TracChangeset
for help on using the changeset viewer.