Changeset 490 in Sophya for trunk/SophyaLib/NTools/histos.h
- Timestamp:
- Oct 21, 1999, 5:25:53 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/NTools/histos.h
r307 r490 1 1 // This may look like C code, but it is really -*- C++ -*- 2 2 // 3 // $Id: histos.h,v 1. 2 1999-05-19 15:58:00ansari Exp $3 // $Id: histos.h,v 1.3 1999-10-21 15:25:47 ansari Exp $ 4 4 // 5 5 … … 7 7 #define HISTOS_SEEN 8 8 9 #include "objfio.h" 10 #include <iostream.h> 9 11 #include <stdio.h> 10 12 #include "peida.h" … … 18 20 19 21 class Histo : public AnyDataObj { 20 friend class FIO_Histo;22 friend class ObjFileIO<Histo>; 21 23 public: 22 24 … … 156 158 }; 157 159 158 ///////////////////////////////////////////////////////////////////////// 160 161 inline POutPersist& operator << (POutPersist& os, Histo & obj) 162 { ObjFileIO<Histo> fio(&obj); fio.Write(os); return(os); } 163 inline PInPersist& operator >> (PInPersist& is, Histo & obj) 164 { ObjFileIO<Histo> fio(&obj); fio.Read(is); return(is); } 165 159 166 // Classe pour la gestion de persistance 160 class FIO_Histo : public PPersist { 161 public: 162 FIO_Histo(); 163 FIO_Histo(string const & filename); 164 FIO_Histo(const Histo & obj); 165 FIO_Histo(Histo * obj); 166 virtual ~FIO_Histo(); 167 virtual AnyDataObj* DataObj(); 168 inline operator Histo() { return(*dobj); } 169 protected : 170 virtual void ReadSelf(PInPersist&); 171 virtual void WriteSelf(POutPersist&) const; 172 Histo * dobj; 173 bool ownobj; 174 }; 167 // ObjFileIO<Histo> 168 175 169 176 170 } // Fin du namespace
Note:
See TracChangeset
for help on using the changeset viewer.