source: Sophya/trunk/SophyaLib/SkyMap/fiosphereecp.h@ 3810

Last change on this file since 3810 was 2610, checked in by ansari, 21 years ago

Ajout classe SphereECP<T> avec sa gestionnaire PPersist - Reza , 7 Septembre 2004

File size: 1.3 KB
Line 
1// This may look like C code, but it is really -*- C++ -*-
2// Gestion de persistance PPF pour les sphereECP
3// R. Ansari, Septembre 2004
4
5#ifndef FIOSPHEREECP_SEEN
6#define FIOSPHEREECP_SEEN
7
8#include "sphereecp.h"
9#include "ppersist.h"
10
11
12namespace SOPHYA {
13
14template <class T>
15class FIO_SphereECP : public PPersist
16{
17public:
18
19FIO_SphereECP();
20FIO_SphereECP(string const & filename);
21FIO_SphereECP(const SphereECP<T>& obj);
22FIO_SphereECP(SphereECP<T>* obj);
23virtual ~FIO_SphereECP();
24virtual AnyDataObj* DataObj();
25void SetDataObj(AnyDataObj & o);
26inline operator SphereECP<T>() { return(*dobj); }
27
28protected :
29
30virtual void ReadSelf(PInPersist&);
31virtual void WriteSelf(POutPersist&) const;
32SphereECP<T>* dobj;
33bool ownobj;
34};
35
36/*! \ingroup SkyMap \fn operator<<(POutPersist&,SphereECP<T>&)
37 \brief Write SphereECP \b obj into POutPersist stream \b os */
38template <class T>
39inline POutPersist& operator << (POutPersist& os, SphereECP<T> & obj)
40{ FIO_SphereECP<T> fio(&obj); fio.Write(os); return(os); }
41
42/*! \ingroup SkyMap \fn operator>>(PInPersist&,SphereECP<T>&)
43 \brief Read SphereECP \b obj from PInPersist stream \b os */
44template <class T>
45inline PInPersist& operator >> (PInPersist& is, SphereECP<T> & obj)
46{ FIO_SphereECP<T> fio(&obj); is.SkipToNextObject(); fio.Read(is); return(is); }
47
48
49} // Fin du namespace
50
51#endif
Note: See TracBrowser for help on using the repository browser.