[3809] | 1 | // This may look like C code, but it is really -*- C++ -*-
|
---|
| 2 | // template array class for numerical types
|
---|
| 3 | // R. Ansari, C.Magneville 03/2000
|
---|
| 4 | // Ajout gestionnaire PPF pour TriangularMatrix<T> 02/2009
|
---|
| 5 |
|
---|
| 6 | #ifndef FIOSpSqMtx_SEEN
|
---|
| 7 | #define FIOSpSqMtx_SEEN
|
---|
| 8 |
|
---|
| 9 | #include "machdefs.h"
|
---|
| 10 | #include <iostream>
|
---|
| 11 | #include "spesqmtx.h"
|
---|
| 12 | #include "trngmtx.h"
|
---|
| 13 | #include "diagmtx.h"
|
---|
| 14 | #include "symmtx.h"
|
---|
| 15 | #include "ppersist.h"
|
---|
| 16 |
|
---|
| 17 | namespace SOPHYA {
|
---|
| 18 |
|
---|
| 19 | //------------------------------------------------------------------------------------
|
---|
| 20 |
|
---|
| 21 | /////////////////////////////////////////////////////////////////////////
|
---|
| 22 | // Gestionnaire PPF de SpecialSquareMatrix<T>
|
---|
| 23 |
|
---|
| 24 | /*!
|
---|
| 25 | \brief Manager class the PPF I/O (SOPHYA persistence) of TriangularMatrix<T> objects.
|
---|
| 26 | */
|
---|
| 27 |
|
---|
| 28 | template <class T>
|
---|
| 29 | class FIO_SpecialSquareMatrix : public PPersist {
|
---|
| 30 | public:
|
---|
| 31 | FIO_SpecialSquareMatrix();
|
---|
| 32 | FIO_SpecialSquareMatrix(string const & filename);
|
---|
| 33 | FIO_SpecialSquareMatrix(const SpecialSquareMatrix<T> & obj);
|
---|
| 34 | FIO_SpecialSquareMatrix(SpecialSquareMatrix<T> * obj);
|
---|
| 35 | virtual ~FIO_SpecialSquareMatrix();
|
---|
| 36 | virtual AnyDataObj* DataObj();
|
---|
| 37 | virtual void SetDataObj(AnyDataObj & o);
|
---|
| 38 | inline operator SpecialSquareMatrix<T>() { return(*dobj); }
|
---|
| 39 | protected :
|
---|
| 40 | virtual void ReadSelf(PInPersist&);
|
---|
| 41 | virtual void WriteSelf(POutPersist&) const;
|
---|
| 42 | SpecialSquareMatrix<T> * dobj; //!< Pointer to the connected SpecialSquareMatrix
|
---|
| 43 | bool ownobj; //!< true if the connected object belong to the class
|
---|
| 44 | };
|
---|
| 45 |
|
---|
| 46 | /*! \ingroup TArray \fn operator<<(POutPersist&,SpecialSquareMatrix<T>&)
|
---|
| 47 | \brief Write SpecialSquareMatrix \b obj into POutPersist stream \b os */
|
---|
| 48 | template <class T>
|
---|
| 49 | inline POutPersist& operator << (POutPersist& os, SpecialSquareMatrix<T> & obj)
|
---|
| 50 | { FIO_SpecialSquareMatrix<T> fio(&obj); fio.Write(os); return(os); }
|
---|
| 51 |
|
---|
| 52 | /*! \ingroup TArray \fn operator>>(PInPersist&,SpecialSquareMatrix<T>&)
|
---|
| 53 | \brief Read SpecialSquareMatrix \b obj from PInPersist stream \b os */
|
---|
| 54 | template <class T>
|
---|
| 55 | inline PInPersist& operator >> (PInPersist& is, SpecialSquareMatrix<T> & obj)
|
---|
| 56 | { FIO_SpecialSquareMatrix<T> fio(&obj); is.SkipToNextObject(); fio.Read(is); return(is); }
|
---|
| 57 |
|
---|
| 58 |
|
---|
| 59 | } // Fin du namespace
|
---|
| 60 |
|
---|
| 61 | #endif
|
---|