Changeset 892 in Sophya
- Timestamp:
- Apr 12, 2000, 11:26:55 AM (25 years ago)
- Location:
- trunk/SophyaLib/SkyMap
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/SkyMap/spherehealpix.cc
r853 r892 229 229 } 230 230 231 template<class T> 232 void 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 246 template<class T> 247 SphereHEALPix<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 231 262 //++ 232 263 // Titre Destructor -
trunk/SophyaLib/SkyMap/spherehealpix.h
r853 r892 203 203 /* impression */ 204 204 void print(ostream& os) const; 205 205 206 207 void CloneOrShare(const SphereHEALPix<T>& a); 208 209 SphereHEALPix<T>& Set(const SphereHEALPix<T>& a); 210 211 inline SphereHEALPix<T>& operator = (const SphereHEALPix<T>& a) 212 {return Set(a);} 213 206 214 private : 207 215
Note:
See TracChangeset
for help on using the changeset viewer.