Changeset 1426 in Sophya


Ignore:
Timestamp:
Feb 28, 2001, 11:13:30 AM (25 years ago)
Author:
ansari
Message:

Ajout variable dsid, methode NDataBlock::DRefId() pour gestion des identificateurs d'objet au niveau des ecritures PPF avec partage de references - Reza 28/2/2001

Location:
trunk/SophyaLib/BaseTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/BaseTools/fiondblock.cc

    r802 r1426  
    8080{
    8181  uint_8 rv = 0;
    82   if (dobj) rv = (uint_8)(dobj->Begin());
     82  if (dobj) rv = (uint_8)(dobj->DRefId());
    8383  return(rv);
    8484}
  • trunk/SophyaLib/BaseTools/ndatablock.cc

    r1349 r1426  
    308308   \endverbatim
    309309 */
     310
     311static uint_8 _ndrefid_ = 0; // Identificateur de NDREF cree
     312
    310313template <class T>
    311314void NDataBlock<T>::Alloc(size_t n,T* data,Bridge* br,bool zero)
     
    323326mSRef = new NDREF;
    324327mSRef->nref = 1;
     328mSRef->dsid = ++_ndrefid_;
    325329if(data) mSRef->data = data;
    326330else {mSRef->data = new T[n]; if (zero) memset(mSRef->data,0,n*sizeof(T));}
  • trunk/SophyaLib/BaseTools/ndatablock.h

    r976 r1426  
    142142  NDataBlock<T> Div(const NDataBlock<T>& b) const;
    143143
     144  inline uint_8 DRefId() { return mSRef->dsid; }
     145
    144146protected:
    145147  //! NDREF structure for reference management
    146148  typedef struct {
    147149    size_t nref;      //!< Number of references to the data structure
     150    uint_8 dsid;      //!< Data structure Id - Used by FIO_NDataBlock
    148151    T* data;          //!< Pointer to data structure itself
    149152    Bridge* bridge;   //!< Pointer to a bridge for the data structure
Note: See TracChangeset for help on using the changeset viewer.