source: Sophya/trunk/SophyaLib/TArray/fiospsqmtx.h@ 4042

Last change on this file since 4042 was 3809, checked in by ansari, 15 years ago

1/ Ajout fichiers / classes de matrices carrees speciales (DiagonalMatrix<T>,

SymmetricMatrix<T> LowerTriangularMatrix<T>

2/ Suppression fichier triangmtx.h et la classe TriangularMatrix<T>
3/ adaptation array.h et enregistrement handlers PPF

Reza, 26/07/2010

File size: 2.1 KB
RevLine 
[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
17namespace 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
28template <class T>
29class FIO_SpecialSquareMatrix : public PPersist {
30public:
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); }
39protected :
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 */
48template <class T>
49inline 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 */
54template <class T>
55inline 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
Note: See TracBrowser for help on using the repository browser.