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