source: Sophya/trunk/SophyaLib/SkyMap/fiospherehealpix.h@ 3754

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
RevLine 
[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
18namespace SOPHYA {
19
20
21template <class T>
[853]22class FIO_SphereHEALPix : public PPersist
[842]23{
24public:
25
[853]26FIO_SphereHEALPix();
27FIO_SphereHEALPix(string const & filename);
28FIO_SphereHEALPix(const SphereHEALPix<T>& obj);
29FIO_SphereHEALPix(SphereHEALPix<T>* obj);
30virtual ~FIO_SphereHEALPix();
[842]31virtual AnyDataObj* DataObj();
32virtual void SetDataObj(AnyDataObj & o);
[853]33inline operator SphereHEALPix<T>() { return(*dobj_); }
[842]34
35protected :
36
37virtual void ReadSelf(PInPersist&);
38virtual void WriteSelf(POutPersist&) const;
[853]39SphereHEALPix<T>* dobj_;
[842]40bool ownobj;
41};
42
[1397]43/*! \ingroup SkyMap \fn operator<<(POutPersist&,SphereHEALPix<T>&)
44 \brief Write SphereHEALPix \b obj into POutPersist stream \b os */
45template <class T>
46inline 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 */
51template <class T>
52inline 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.