| Last change
 on this file since 2930 was             2479, checked in by ansari, 22 years ago | 
        
          | 
Ajout SkipToNextObjet() ds PInPersist operator >> - Reza 7 Dec 2003
 | 
        
          | File size:
            1.5 KB | 
      
      
| Line |  | 
|---|
| 1 | // G. Le Meur 04/2000 | 
|---|
| 2 |  | 
|---|
| 3 |  | 
|---|
| 4 |  | 
|---|
| 5 | #ifndef FIOSPHERETHETAPHI_SEEN | 
|---|
| 6 | #define FIOSPHERETHETAPHI_SEEN | 
|---|
| 7 | #include "sphericalmap.h" | 
|---|
| 8 | #include "tvector.h" | 
|---|
| 9 | #include "ndatablock.h" | 
|---|
| 10 | #include "spherethetaphi.h" | 
|---|
| 11 |  | 
|---|
| 12 | #include "anydataobj.h" | 
|---|
| 13 | #include "ppersist.h" | 
|---|
| 14 |  | 
|---|
| 15 |  | 
|---|
| 16 | // | 
|---|
| 17 | // ------------- Classes pour la gestion de persistance -- | 
|---|
| 18 | // | 
|---|
| 19 |  | 
|---|
| 20 | namespace SOPHYA { | 
|---|
| 21 |  | 
|---|
| 22 | template <class T> | 
|---|
| 23 | class FIO_SphereThetaPhi : public PPersist | 
|---|
| 24 | { | 
|---|
| 25 | public: | 
|---|
| 26 |  | 
|---|
| 27 | FIO_SphereThetaPhi(); | 
|---|
| 28 | FIO_SphereThetaPhi(string const & filename); | 
|---|
| 29 | FIO_SphereThetaPhi(const SphereThetaPhi<T>& obj); | 
|---|
| 30 | FIO_SphereThetaPhi(SphereThetaPhi<T>* obj); | 
|---|
| 31 | virtual ~FIO_SphereThetaPhi(); | 
|---|
| 32 | virtual AnyDataObj* DataObj(); | 
|---|
| 33 | void SetDataObj(AnyDataObj & o); | 
|---|
| 34 | inline operator SphereThetaPhi<T>() { return(*dobj); } | 
|---|
| 35 |  | 
|---|
| 36 | protected : | 
|---|
| 37 |  | 
|---|
| 38 | virtual void ReadSelf(PInPersist&); | 
|---|
| 39 | virtual void WriteSelf(POutPersist&) const; | 
|---|
| 40 | SphereThetaPhi<T>* dobj; | 
|---|
| 41 | bool ownobj; | 
|---|
| 42 | }; | 
|---|
| 43 |  | 
|---|
| 44 | /*! \ingroup SkyMap \fn operator<<(POutPersist&,SphereThetaPhi<T>&) | 
|---|
| 45 | \brief Write SphereThetaPhi \b obj into POutPersist stream \b os */ | 
|---|
| 46 | template <class T> | 
|---|
| 47 | inline POutPersist& operator << (POutPersist& os, SphereThetaPhi<T> & obj) | 
|---|
| 48 | { FIO_SphereThetaPhi<T> fio(&obj);  fio.Write(os);  return(os); } | 
|---|
| 49 |  | 
|---|
| 50 | /*! \ingroup SkyMap \fn operator>>(PInPersist&,SphereThetaPhi<T>&) | 
|---|
| 51 | \brief Read SphereThetaPhi \b obj from PInPersist stream \b os */ | 
|---|
| 52 | template <class T> | 
|---|
| 53 | inline PInPersist& operator >> (PInPersist& is, SphereThetaPhi<T> & obj) | 
|---|
| 54 | { FIO_SphereThetaPhi<T> fio(&obj); is.SkipToNextObject(); fio.Read(is); return(is); } | 
|---|
| 55 |  | 
|---|
| 56 |  | 
|---|
| 57 | } // Fin du namespace | 
|---|
| 58 |  | 
|---|
| 59 | #endif | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.