Changeset 979 in Sophya for trunk/SophyaLib/SkyMap/localmap.cc
- Timestamp:
- Apr 28, 2000, 4:09:46 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/SkyMap/localmap.cc
r908 r979 65 65 //++ 66 66 template<class T> 67 LocalMap<T>::LocalMap() 67 LocalMap<T>::LocalMap() : pixels_() 68 68 // 69 69 // … … 71 71 { 72 72 InitNul(); 73 pixels_.Reset();73 // pixels_.Reset(); 74 74 } 75 75 … … 148 148 } 149 149 150 ////////////////////////// methodes de copie/share 151 152 template<class T> 153 void LocalMap<T>::CloneOrShare(const LocalMap<T>& a) 154 { 155 recopierVariablesSimples(a); 156 pixels_.CloneOrShare(a.pixels_); 157 } 158 159 template<class T> 160 LocalMap<T>& LocalMap<T>::CopyElt(const LocalMap<T>& a) 161 { 162 if (NbPixels() < 1) 163 throw RangeCheckError("LocalMap<T>::CopyElt(const LocalMap<T>& ) - Not Allocated Array ! "); 164 if (NbPixels() != a.NbPixels()) 165 throw(SzMismatchError("LocalMap<T>::CopyElt(const LocalMap<T>&) SizeMismatch")) ; 166 recopierVariablesSimples(a); 167 int k; 168 for (k=0; k< nPix_; k++) pixels_(k) = a.pixels_(k); 169 return(*this); 170 171 } 172 150 173 template<class T> 151 174 LocalMap<T>& LocalMap<T>::Set(const LocalMap<T>& a) … … 153 176 if (this != &a) 154 177 { 155 recopierVariablesSimples(a); 156 pixels_.CloneOrShare(a.pixels_); 178 if (a.NbPixels() < 1) 179 throw RangeCheckError("LocalMap<T>::Set(a ) - Array a not allocated ! "); 180 if (NbPixels() < 1) CloneOrShare(a); 181 else CopyElt(a); 157 182 if (mInfo_) delete mInfo_; 158 183 mInfo_ = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.