Ignore:
Timestamp:
Feb 25, 2012, 10:40:10 PM (14 years ago)
Author:
ansari
Message:

modifs ds PPersist (classe PIOPersist) pour permettre l'enregistrement automatique (1ere lecture ou ecriture) de PPFWrapperSTLVector<T> (gestionnaire ppersist de std::vector<T> , Reza+cmv 25/02/2012

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/BaseTools/ppfwrapstlv.h

    r2805 r4051  
    6363  inline operator std::vector<T>()  { return(*dobj); }
    6464
     65  virtual void       Write(POutPersist& os) const
     66  {
     67    if (!PIOPersist::checkPPClassId(*this)) {  // on enregistre la classe
     68      PPRegister(PPFWrapperSTLVector< T >);
     69      DObjRegister(PPFWrapperSTLVector< T >, std::vector< T >);
     70    }
     71    PPersist::Write(os);
     72  }
     73  virtual void       Read(PInPersist& os)
     74  {
     75    if (!PIOPersist::checkPPClassId(*this)) {  // on enregistre la classe
     76      PPRegister(PPFWrapperSTLVector< T >);
     77      DObjRegister(PPFWrapperSTLVector< T >, std::vector< T >);
     78    }
     79    PPersist::Read(os);
     80  }
     81
    6582protected :
    6683  virtual void       ReadSelf(PInPersist& is)
     
    7390    // On efface le contenu du vecteur si necessaire - (on peut faire plus efficacement ...)
    7491    if ( dobj->size() > 0) dobj->erase(dobj->begin(), dobj->end());
    75     T el;
    7692    for(uint_8 k=0; k<itab[1]; k++) {
     93      T el;
    7794      is >> el;
    7895      dobj->push_back(el);
Note: See TracChangeset for help on using the changeset viewer.