source: Sophya/trunk/SophyaLib/SkyMap/fiospherethetaphi.h@ 3846

Last change on this file since 3846 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
20namespace SOPHYA {
21
22template <class T>
23class FIO_SphereThetaPhi : public PPersist
24{
25public:
26
27FIO_SphereThetaPhi();
28FIO_SphereThetaPhi(string const & filename);
29FIO_SphereThetaPhi(const SphereThetaPhi<T>& obj);
30FIO_SphereThetaPhi(SphereThetaPhi<T>* obj);
31virtual ~FIO_SphereThetaPhi();
32virtual AnyDataObj* DataObj();
33void SetDataObj(AnyDataObj & o);
34inline operator SphereThetaPhi<T>() { return(*dobj); }
35
36protected :
37
38virtual void ReadSelf(PInPersist&);
39virtual void WriteSelf(POutPersist&) const;
40SphereThetaPhi<T>* dobj;
41bool ownobj;
42};
43
44/*! \ingroup SkyMap \fn operator<<(POutPersist&,SphereThetaPhi<T>&)
45 \brief Write SphereThetaPhi \b obj into POutPersist stream \b os */
46template <class T>
47inline 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 */
52template <class T>
53inline 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.