Index: trunk/SophyaLib/BaseTools/ppfswapper.h
===================================================================
--- trunk/SophyaLib/BaseTools/ppfswapper.h	(revision 2693)
+++ trunk/SophyaLib/BaseTools/ppfswapper.h	(revision 2695)
@@ -23,4 +23,5 @@
 class PPFDataSwapper : public DataSwapperInterface<T> {
 public:
+  PPFDataSwapper() { ppfos = NULL; ppfis = NULL;}
   PPFDataSwapper(POutPersist & os) { ppfos = &os; ppfis = NULL;}
   PPFDataSwapper(PInPersist & is) { ppfos = NULL; ppfis = &is;}
Index: trunk/SophyaLib/BaseTools/ppftpointerio.cc
===================================================================
--- trunk/SophyaLib/BaseTools/ppftpointerio.cc	(revision 2693)
+++ trunk/SophyaLib/BaseTools/ppftpointerio.cc	(revision 2695)
@@ -102,4 +102,5 @@
 
 }  // namespace SOPHYA
+/*
 #ifdef __CXX_PRAGMA_TEMPLATES__
 #pragma define_template PPF_TPointer_IO< char >
@@ -133,3 +134,3 @@
 template class PPF_TPointer_IO< complex<r_8> >;
 #endif
-
+*/
Index: trunk/SophyaLib/BaseTools/ppftpointerio.h
===================================================================
--- trunk/SophyaLib/BaseTools/ppftpointerio.h	(revision 2693)
+++ trunk/SophyaLib/BaseTools/ppftpointerio.h	(revision 2695)
@@ -37,4 +37,76 @@
 };
 
+// declaration specifique pour ecriture sous forme de tableaux PPF
+class PPF_TPointer_IO<char> {
+public:
+  static void Write(POutPersist & os,  char  const * arr, size_t n);
+  static void Read(PInPersist & is, char * arr, size_t n);
+};
+
+class PPF_TPointer_IO<int_1> {
+public:
+  static void Write(POutPersist & os,  int_1  const * arr, size_t n);
+  static void Read(PInPersist & is, int_1 * arr, size_t n);
+};
+class PPF_TPointer_IO<uint_1> {
+public:
+  static void Write(POutPersist & os,  uint_1  const * arr, size_t n);
+  static void Read(PInPersist & is, uint_1 * arr, size_t n);
+};
+
+class PPF_TPointer_IO<int_2> {
+public:
+  static void Write(POutPersist & os,  int_2  const * arr, size_t n);
+  static void Read(PInPersist & is, int_2 * arr, size_t n);
+};
+class PPF_TPointer_IO<uint_2> {
+public:
+  static void Write(POutPersist & os,  uint_2  const * arr, size_t n);
+  static void Read(PInPersist & is, uint_2 * arr, size_t n);
+};
+
+class PPF_TPointer_IO<int_4> {
+public:
+  static void Write(POutPersist & os,  int_4  const * arr, size_t n);
+  static void Read(PInPersist & is, int_4 * arr, size_t n);
+};
+class PPF_TPointer_IO<uint_4> {
+public:
+  static void Write(POutPersist & os,  uint_4  const * arr, size_t n);
+  static void Read(PInPersist & is, uint_4 * arr, size_t n);
+};
+
+class PPF_TPointer_IO<int_8> {
+public:
+  static void Write(POutPersist & os,  int_8  const * arr, size_t n);
+  static void Read(PInPersist & is, int_8 * arr, size_t n);
+};
+class PPF_TPointer_IO<uint_8> {
+public:
+  static void Write(POutPersist & os,  uint_8  const * arr, size_t n);
+  static void Read(PInPersist & is, uint_8 * arr, size_t n);
+};
+
+class PPF_TPointer_IO<r_4> {
+public:
+  static void Write(POutPersist & os,  r_4  const * arr, size_t n);
+  static void Read(PInPersist & is, r_4 * arr, size_t n);
+};
+class PPF_TPointer_IO<r_8> {
+public:
+  static void Write(POutPersist & os,  r_8  const * arr, size_t n);
+  static void Read(PInPersist & is, r_8 * arr, size_t n);
+};
+
+class PPF_TPointer_IO< complex<r_4> > {
+public:
+  static void Write(POutPersist & os,  complex<r_4>  const * arr, size_t n);
+  static void Read(PInPersist & is, complex<r_4> * arr, size_t n);
+};
+class PPF_TPointer_IO< complex<r_8> > {
+public:
+  static void Write(POutPersist & os,  complex<r_8>  const * arr, size_t n);
+  static void Read(PInPersist & is, complex<r_8> * arr, size_t n);
+};
 
 }  // namespace SOPHYA
Index: trunk/SophyaLib/BaseTools/swsegdb.h
===================================================================
--- trunk/SophyaLib/BaseTools/swsegdb.h	(revision 2693)
+++ trunk/SophyaLib/BaseTools/swsegdb.h	(revision 2695)
@@ -120,9 +120,10 @@
     mSRef = a.mSRef;
     mSRef->nref++;
+    return *this;
   }
 
-  //! Return the position tag (swap position) table
-  std::vector< int_8 > & GetSwapPosTagTable() const 
-  { 
+  //! Empties all memory buffers to swap stream 
+  void SwapOutBuffer() const
+  {
     if ((mSRef->bidx >= 0) && !mSRef->fgcstbuff) {
       int_8 nswp = mSRef->swapper->WriteToSwap(mSRef->buff, mSRef->segsize, mSRef->bidx, 
@@ -130,5 +131,12 @@
       mSRef->swp[mSRef->bidx] = nswp;
       mSRef->fgwp[mSRef->bidx] = true;
-    }
+      mSRef->bidx = -1;
+      mSRef->fgcstbuff = true;  
+   }
+  }
+  //! Return the position tag (swap position) table, after call to SwapOutBuffer()
+  std::vector< int_8 > & GetSwapPosTagTable() const 
+  { 
+    SwapOutBuffer();
     return  mSRef->swp; 
   } 
