Ignore:
Timestamp:
Sep 27, 2008, 12:37:33 AM (13 years ago)
Author:
Peter
Message:

refs #368 - redesign to solve some issues regarding mutable functionality in WeightedIterator?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/data_weight_proxy_test.cc

    r1535 r1537  
    3131  {
    3232  public:
    33     ProxyHolder(utility::DataWeightProxy& proxy)
     33    typedef utility::DataWeightProxy<double*, double*> Proxy;
     34    ProxyHolder(Proxy& proxy)
    3435      : proxy_(proxy) {}
    3536
    36     inline utility::DataWeightProxy& operator()(void) { return proxy_; }
    37     inline const utility::DataWeightProxy& operator()(void) const
     37    inline Proxy& operator()(void) { return proxy_; }
     38    inline const Proxy& operator()(void) const
    3839    { return proxy_; }
    3940  private:
    40     utility::DataWeightProxy& proxy_;
     41    Proxy& proxy_;
    4142  };
    4243}}}
     
    4950  suite.err() << "testing DataWeightProxy" << std::endl;
    5051
    51   using utility::DataWeightProxy;
    5252  using utility::DataWeight;
     53
     54  typedef utility::DataWeightProxy<double*, double*> Proxy;
    5355
    5456  double x=1.2;
    5557  double w=3.14;
    5658  DataWeight xw(x, w);
    57   DataWeightProxy proxy(x,w);
     59  Proxy proxy(&x,&w);
    5860  if (xw != proxy) {
    5961    suite.add(false);
Note: See TracChangeset for help on using the changeset viewer.