Ignore:
Timestamp:
Apr 12, 2000, 11:26:55 AM (25 years ago)
Author:
ansari
Message:

surcharge operateur =

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/SkyMap/spherehealpix.cc

    r853 r892  
    229229}
    230230
     231template<class T>
     232void SphereHEALPix<T>::CloneOrShare(const SphereHEALPix<T>& a)
     233{
     234  string exmsg = "SphereHEALPix<T>::CloneOrShare()";
     235  if (nSide_ != a.nSide_ )
     236    {
     237      cout << " spheres of different sizes " << endl;
     238      string exmsg = "SphereHEALPix<T>::CloneOrShare()";
     239      throw( ParmError(exmsg) );
     240    }
     241  pixels_.CloneOrShare(a.pixels_);
     242  sliceBeginIndex_.CloneOrShare(a.sliceBeginIndex_);
     243  sliceLenght_.CloneOrShare(a.sliceLenght_);
     244}
     245
     246template<class T>
     247SphereHEALPix<T>& SphereHEALPix<T>::Set(const SphereHEALPix<T>& a)
     248   {
     249  if (this != &a)
     250    {
     251      CloneOrShare(a);
     252      nSide_= a.nSide_;
     253     nPix_ = a.nPix_;
     254     omeg_ = a.omeg_;
     255     if (mInfo_) delete mInfo_;
     256     if (a.mInfo_) mInfo_ = new DVList(*(a.mInfo_));
     257    }
     258  return(*this);
     259   }
     260
     261
    231262//++
    232263// Titre        Destructor
Note: See TracChangeset for help on using the changeset viewer.