|
Last change
on this file since 2265 was 1397, checked in by ansari, 25 years ago |
|
Ajout operateur >> et << pour PPersist des LocalMap et SphericalMap - Reza 12/2/2001
|
|
File size:
1.4 KB
|
| Rev | Line | |
|---|
| [842] | 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 |
|
|---|
| [1397] | 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); fio.Read(is); return(is); }
|
|---|
| 55 |
|
|---|
| 56 |
|
|---|
| [842] | 57 | } // Fin du namespace
|
|---|
| 58 |
|
|---|
| 59 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.