Changeset 1533 for trunk/yat/utility/DataWeightProxy.h
- Timestamp:
- Sep 25, 2008, 2:02:52 PM (14 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/utility/DataWeightProxy.h
r1532 r1533 1 #ifndef _theplu_yat_utility_data_weight_ 2 #define _theplu_yat_utility_data_weight_ 1 #ifndef _theplu_yat_utility_data_weight_proxy_ 2 #define _theplu_yat_utility_data_weight_proxy_ 3 3 4 4 // $Id$ … … 28 28 29 29 /** 30 \brief Holds a pair of data and associated weight 30 \internal 31 32 \brief Proxy class for DataWeight 31 33 */ 32 class DataWeight 34 class DataWeightProxy 33 35 { 34 36 public: … … 39 41 \param weight weight value to hold 40 42 */ 41 explicit DataWeight(double data=0.0, double weight=1.0);43 DataWeightProxy(double& data, double& weight); 42 44 43 45 /** … … 61 63 const double& weight(void) const; 62 64 private: 63 double data_; 64 double weight_; 65 // using compiler generated copy 66 // DataWeight(const DataWeight&) 67 // DataWeight& operator=(const DataWeight&); 65 double& data_; 66 double& weight_; 67 68 // no copying 69 DataWeightProxy(const DataWeightProxy&); 70 DataWeightProxy& operator=(const DataWeightProxy&); 68 71 }; 69 70 /**71 \brief equality operator72 73 \return true if data are equal74 */75 bool operator==(const DataWeight&, const DataWeight&);76 77 /**78 \brief inequality operator79 80 \return true if data are inequal81 */82 bool operator!=(const DataWeight&, const DataWeight&);83 84 /**85 \brief comparison operator86 87 \return true if lhs data is less than rhs data88 */89 bool operator<(const DataWeight&, const DataWeight&);90 91 /**92 \brief comparison operator93 94 \return true if lhs data is greater than rhs data95 */96 bool operator>(const DataWeight&, const DataWeight&);97 98 /**99 \brief comparison operator100 101 \return true if rhs > lhs102 */103 bool operator<=(const DataWeight&, const DataWeight&);104 105 /**106 \brief comparison operator107 108 \return true if rhs < lhs109 */110 bool operator>=(const DataWeight&, const DataWeight&);111 112 72 113 73 }}} // of namespace utility, yat, and theplu
Note: See TracChangeset
for help on using the changeset viewer.