- Timestamp:
- Feb 5, 2007, 10:04:46 AM (19 years ago)
- Location:
- trunk/SophyaLib/TArray
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/TArray/basarr.cc
r3107 r3173 741 741 } 742 742 743 743 //! Set the array sizes to zero, corresponding to an unallocated array 744 void BaseArray::SetZeroSize() 745 { 746 ndim_ = 0; 747 for(int_4 k=0; k<BASEARRAY_MAXNDIMS; k++) step_[k] = size_[k] = 0; 748 totsize_ = 0; 749 minstep_ = 0; 750 moystep_ = 0; 751 offset_ = 0; 752 // On ne change pas l'organisation memoire, le type de vecteur 753 // et le array type 754 } 755 -
trunk/SophyaLib/TArray/basarr.h
r2917 r3173 183 183 virtual void UpdateSubArraySizes(BaseArray & ra, int_4 ndim, sa_size_t * siz, sa_size_t * pos, sa_size_t * step) const; 184 184 185 // Pour mettre les tailles a zero 186 virtual void SetZeroSize(); 187 185 188 int_4 ndim_; //!< number of dimensions of array 186 189 sa_size_t size_[BASEARRAY_MAXNDIMS]; //!< array of the size in each dimension -
trunk/SophyaLib/TArray/tarray.cc
r3101 r3173 382 382 } 383 383 384 //! To clear the array sizes - corresponding to an unallocated array. 385 template <class T> 386 TArray<T>& TArray<T>::ZeroSize() 387 { 388 if (NbDimensions() == 0) return (*this); 389 SetZeroSize(); 390 mNDBlock.Dealloc(); 391 return (*this); 392 } 384 393 385 394 /*! -
trunk/SophyaLib/TArray/tarray.h
r2938 r3173 67 67 void Realloc(int_4 ndim, sa_size_t * siz, sa_size_t step=1, bool force=false); 68 68 69 //! To clear the array sizes - corresponding to an unallocated array. 70 virtual TArray<T>& ZeroSize(); 71 69 72 // Compacts size=1 array dimensions 70 73 virtual TArray<T>& CompactAllDimensions(); … … 212 215 virtual void WriteASCII(ostream& os) const; 213 216 217 //! assign a new object Id (or DataRef Id) - useful for PPF write operations 218 inline void RenewObjId() { mNDBlock.RenewObjId(); } 214 219 // Pour la gestion de persistance 215 220 friend class FIO_TArray<T>; -
trunk/SophyaLib/TArray/tarrinit.cc
r3017 r3173 20 20 21 21 // Module version number - 2.0 , Jul 2006 22 #define MOD_VERS 2.0 22 // Module version number - 2.02 , Fev 2006: Ajout TArray::ZeroSize() , RenewObjId() 23 #define MOD_VERS 2.02 23 24 24 25 TArrayInitiator::TArrayInitiator()
Note:
See TracChangeset
for help on using the changeset viewer.