| 
            Last change
 on this file since 808 was             804, checked in by ansari, 26 years ago           | 
        
        
          
            
Amelioation / debugging de la classe TArray<T> - TVector et TMatrix 
 
 
heritent maintenant de TArray<T> - Classe RCMatrix rendu prive au fichier 
sopemtx.cc - linfit.cc integre a sopemtx.cc 
 
Reza 03/04/2000 
 
 
           | 
        
        
          | 
            File size:
            1.3 KB
           | 
        
      
      
| Line |   | 
|---|
| 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 | 
 | 
|---|
| 5 | #ifndef FIOTArray_SEEN
 | 
|---|
| 6 | #define FIOTArray_SEEN
 | 
|---|
| 7 | 
 | 
|---|
| 8 | #include "machdefs.h"
 | 
|---|
| 9 | #include <iostream.h>
 | 
|---|
| 10 | #include "tarray.h"
 | 
|---|
| 11 | #include "tmatrix.h"
 | 
|---|
| 12 | #include "tvector.h"
 | 
|---|
| 13 | #include "ppersist.h"
 | 
|---|
| 14 | 
 | 
|---|
| 15 | namespace SOPHYA {
 | 
|---|
| 16 | /////////////////////////////////////////////////////////////////////////
 | 
|---|
| 17 | // Classe pour la gestion de persistance
 | 
|---|
| 18 | template <class T>
 | 
|---|
| 19 | class FIO_TArray : public  PPersist  {
 | 
|---|
| 20 | public:
 | 
|---|
| 21 |   FIO_TArray();
 | 
|---|
| 22 |   FIO_TArray(string const & filename); 
 | 
|---|
| 23 |   FIO_TArray(const TArray<T> & obj);
 | 
|---|
| 24 |   FIO_TArray(TArray<T> * obj);
 | 
|---|
| 25 |   virtual ~FIO_TArray();
 | 
|---|
| 26 |   virtual AnyDataObj* DataObj();
 | 
|---|
| 27 |   virtual void        SetDataObj(AnyDataObj & o);
 | 
|---|
| 28 |   inline operator TArray<T>() { return(*dobj); }
 | 
|---|
| 29 | protected :
 | 
|---|
| 30 |   virtual void ReadSelf(PInPersist&);           
 | 
|---|
| 31 |   virtual void WriteSelf(POutPersist&) const;  
 | 
|---|
| 32 |   TArray<T> * dobj;
 | 
|---|
| 33 |   bool ownobj;
 | 
|---|
| 34 | };
 | 
|---|
| 35 | 
 | 
|---|
| 36 | template <class T>
 | 
|---|
| 37 | inline POutPersist& operator << (POutPersist& os, TArray<T> & obj)
 | 
|---|
| 38 | { FIO_TArray<T> fio(&obj);  fio.Write(os);  return(os); }
 | 
|---|
| 39 | template <class T>
 | 
|---|
| 40 | inline PInPersist& operator >> (PInPersist& is, TArray<T> & obj)
 | 
|---|
| 41 | { FIO_TArray<T> fio(&obj);  fio.Read(is);  return(is); }
 | 
|---|
| 42 | 
 | 
|---|
| 43 | 
 | 
|---|
| 44 | } // Fin du namespace
 | 
|---|
| 45 | 
 | 
|---|
| 46 | #endif
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.