Changeset 1426 in Sophya
- Timestamp:
- Feb 28, 2001, 11:13:30 AM (25 years ago)
- Location:
- trunk/SophyaLib/BaseTools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/BaseTools/fiondblock.cc
r802 r1426 80 80 { 81 81 uint_8 rv = 0; 82 if (dobj) rv = (uint_8)(dobj-> Begin());82 if (dobj) rv = (uint_8)(dobj->DRefId()); 83 83 return(rv); 84 84 } -
trunk/SophyaLib/BaseTools/ndatablock.cc
r1349 r1426 308 308 \endverbatim 309 309 */ 310 311 static uint_8 _ndrefid_ = 0; // Identificateur de NDREF cree 312 310 313 template <class T> 311 314 void NDataBlock<T>::Alloc(size_t n,T* data,Bridge* br,bool zero) … … 323 326 mSRef = new NDREF; 324 327 mSRef->nref = 1; 328 mSRef->dsid = ++_ndrefid_; 325 329 if(data) mSRef->data = data; 326 330 else {mSRef->data = new T[n]; if (zero) memset(mSRef->data,0,n*sizeof(T));} -
trunk/SophyaLib/BaseTools/ndatablock.h
r976 r1426 142 142 NDataBlock<T> Div(const NDataBlock<T>& b) const; 143 143 144 inline uint_8 DRefId() { return mSRef->dsid; } 145 144 146 protected: 145 147 //! NDREF structure for reference management 146 148 typedef struct { 147 149 size_t nref; //!< Number of references to the data structure 150 uint_8 dsid; //!< Data structure Id - Used by FIO_NDataBlock 148 151 T* data; //!< Pointer to data structure itself 149 152 Bridge* bridge; //!< Pointer to a bridge for the data structure
Note:
See TracChangeset
for help on using the changeset viewer.