Changeset 1535 for trunk/yat


Ignore:
Timestamp:
Sep 25, 2008, 9:01:48 PM (13 years ago)
Author:
Peter
Message:

fixing DataWeightProxy?

Location:
trunk/yat/utility
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/DataWeightProxy.cc

    r1533 r1535  
    5252  }
    5353
     54
     55  DataWeightProxy& DataWeightProxy::operator=(const DataWeight& rhs)
     56  {
     57    data() = rhs.data();
     58    weight() = rhs.weight();
     59    return *this;
     60  }
     61
     62
     63  DataWeightProxy::operator DataWeight() const
     64  {
     65    return DataWeight(data(), weight());
     66  }
     67
     68
    5469}}} // of namespace utility, yat, and theplu
  • trunk/yat/utility/DataWeightProxy.h

    r1533 r1535  
    2222  along with yat. If not, see <http://www.gnu.org/licenses/>.
    2323*/
     24
     25#include "DataWeight.h"
    2426
    2527namespace theplu {
     
    6264     */
    6365    const double& weight(void) const;
     66
     67    /**
     68       \brief assignment operator
     69     */
     70    DataWeightProxy& operator=(const DataWeight& rhs);
     71
     72    /**
     73       \brief Conversion to DataWeight
     74     */
     75    operator DataWeight() const;
     76
    6477  private:
    6578    double& data_;
Note: See TracChangeset for help on using the changeset viewer.