Changeset 278 in Sophya for trunk/SophyaLib/NTools/dvlist.h


Ignore:
Timestamp:
Apr 28, 1999, 3:36:50 PM (26 years ago)
Author:
ansari
Message:

Implementation PPersist par deleguation pour DVList Reza 28/04/99

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/NTools/dvlist.h

    r220 r278  
    66#define DVLIST_H_SEEN
    77
    8 #include "ppersist.h"
     8#include "objfio.h"
    99
    1010#include <stdio.h>
     
    2121#include <map.h>
    2222#endif
     23
     24namespace PlanckDPC {
    2325
    2426// Classe utilitaire pour manipuler des variables typees
     
    6668//  Classe liste de variables  Dynamic Variable List 
    6769
    68 class DVList : public PPersist {
     70class DVList : public AnyDataObj {
    6971public:
    70   enum {classId = ClassId_DVList };
     72//  enum {classId = ClassId_DVList };
    7173
    7274                    DVList();
     
    9799  inline void       Print() const  { Print(cout); } 
    98100  virtual void      Print(ostream& os)  const;
     101
     102  typedef map<string, MuTyV, less<string> >  ValList;
     103  inline ValList::const_iterator Begin() { return(mvlist.begin()); }
     104  inline ValList::const_iterator End() { return(mvlist.end()); }
    99105 
    100   int_4             ClassId() const        { return classId; }
    101   static PPersist*  Create()               { return new DVList;}
     106//  int_4             ClassId() const        { return classId; }
     107//  static PPersist*  Create()               { return new DVList;}
    102108
    103   virtual void      WriteSelf(POutPersist&) const;
    104   virtual void      ReadSelf(PInPersist&);
     109//  virtual void      WriteSelf(POutPersist&) const;
     110//  virtual void      ReadSelf(PInPersist&);
    105111
    106112private:
    107   typedef map<string, MuTyV, less<string> >  ValList;
    108113 
    109114  ValList mvlist;
     
    114119  {  dvl.Print(s);  return(s);  }
    115120
     121inline POutPersist& operator << (POutPersist& os, DVList & obj)
     122{ ObjFileIO<DVList> fio(&obj);  fio.Write(os);  return(os); }
     123inline PInPersist& operator >> (PInPersist& is, DVList & obj)
     124{ ObjFileIO<DVList> fio(&obj);  fio.Read(is);  return(is); }
     125
     126// Classe pour la gestion de persistance
     127// ObjFileIO<DVList>
     128
     129} // namespace PlanckDPC
     130
    116131#endif /* DVLIST_H__SEEN */
    117132
Note: See TracChangeset for help on using the changeset viewer.