| 268 |
Assignment operator |
Assignment operator |
| 269 |
*/ |
*/ |
| 270 |
ParamFunctor & operator = (const ParamFunctor & rhs) { |
ParamFunctor & operator = (const ParamFunctor & rhs) { |
| 271 |
ParamFunctor copy(rhs); |
// ParamFunctor copy(rhs); |
| 272 |
// swap auto_ptr by hand |
// swap auto_ptr by hand |
| 273 |
// Impl * p = fImpl.release(); |
// Impl * p = fImpl.release(); |
| 274 |
// fImpl.reset(copy.fImpl.release()); |
// fImpl.reset(copy.fImpl.release()); |
| 276 |
|
|
| 277 |
|
|
| 278 |
if (fImpl) delete fImpl; |
if (fImpl) delete fImpl; |
| 279 |
|
fImpl = 0; |
| 280 |
if (rhs.fImpl != 0) |
if (rhs.fImpl != 0) |
| 281 |
fImpl = rhs.fImpl->Clone(); |
fImpl = rhs.fImpl->Clone(); |
|
else |
|
|
fImpl = 0; |
|
| 282 |
|
|
| 283 |
return *this; |
return *this; |
| 284 |
} |
} |
| 285 |
|
|
| 286 |
|
void * GetImpl() { return (void *) fImpl; } |
| 287 |
|
|
| 288 |
|
|
| 289 |
double operator() (double * x, double * p) { |
double operator() (double * x, double * p) { |
| 290 |
return (*fImpl)(x,p); |
return (*fImpl)(x,p); |