Last change
on this file since 3818 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 | #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>
|
---|
22 | class FIO_SphereHEALPix : public PPersist
|
---|
23 | {
|
---|
24 | public:
|
---|
25 |
|
---|
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();
|
---|
31 | virtual AnyDataObj* DataObj();
|
---|
32 | virtual void SetDataObj(AnyDataObj & o);
|
---|
33 | inline operator SphereHEALPix<T>() { return(*dobj_); }
|
---|
34 |
|
---|
35 | protected :
|
---|
36 |
|
---|
37 | virtual void ReadSelf(PInPersist&);
|
---|
38 | virtual void WriteSelf(POutPersist&) const;
|
---|
39 | SphereHEALPix<T>* dobj_;
|
---|
40 | bool ownobj;
|
---|
41 | };
|
---|
42 |
|
---|
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)
|
---|
53 | { FIO_SphereHEALPix<T> fio(&obj); is.SkipToNextObject(); fio.Read(is); return(is); }
|
---|
54 |
|
---|
55 | } // Fin du namespace
|
---|
56 |
|
---|
57 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.