Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/med.git] / src / MEDMEM / MEDMEM_SkyLineArray.hxx
index 3c894edd7934ef5ffd7eb347c8212c02aed76128..5a5b6e43a34257b5e1c0ca3399b13c2d2ac31e6e 100644 (file)
@@ -1,32 +1,42 @@
-// Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-// 
+//
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either 
+// License as published by the Free Software Foundation; either
 // version 2.1 of the License.
-// 
-// This library is distributed in the hope that it will be useful 
-// but WITHOUT ANY WARRANTY; without even the implied warranty of 
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 // Lesser General Public License for more details.
 //
-// You should have received a copy of the GNU Lesser General Public  
-// License along with this library; if not, write to the Free Software 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-// See http://www.salome-platform.org/
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 # ifndef __MEDSKYLINEARRAY_H__
 # define __MEDSKYLINEARRAY_H__
 
+#include "MEDMEM.hxx"
+
 #include "MEDMEM_Exception.hxx"
 
 #include "MEDMEM_PointerOf.hxx"
 #include "MEDMEM_define.hxx"
 
+#include <cstring>
+
 namespace MEDMEM {
-class MEDSKYLINEARRAY
+  class MEDSKYLINEARRAY;
+  MEDMEM_EXPORT ostream& operator<<(ostream &os, const MEDSKYLINEARRAY &sky);
+
+class MEDMEM_EXPORT MEDSKYLINEARRAY
 {
 private :
   int   _count ;
@@ -56,7 +66,7 @@ public :
   // Sinon le MEDSKYLINEARRAY prend directement les pointeurs et en devient 
   // propriĆ©taire
   MEDSKYLINEARRAY( const int count, const int length,
-                  const int* index, const int* value, bool shallowCopy=false );
+                   const int* index, const int* value, bool shallowCopy=false );
 
   ~MEDSKYLINEARRAY();
   //void setMEDSKYLINEARRAY( const int count, const int length, int* index , int* value ) ;
@@ -76,6 +86,8 @@ public :
   inline void setIndexValue(int i, int value) throw (MEDEXCEPTION) ;
 
   friend ostream& operator<<(ostream &os, const MEDSKYLINEARRAY &sky);
+        MEDSKYLINEARRAY* makeReverseArray();
+
 };
 
 // ---------------------------------------
@@ -84,19 +96,19 @@ public :
 inline int MEDSKYLINEARRAY::getNumberOf() const
 {
   return _count ;
-};
+}
 inline int MEDSKYLINEARRAY::getLength() const
 {
   return _length ;
-};
+}
 inline const int*  MEDSKYLINEARRAY::getIndex() const
 {
   return (const int*)_index ;
-} ;
+} 
 inline const int*  MEDSKYLINEARRAY::getValue() const
 {
   return (const int*)_value ;
-} ;
+} 
 inline int MEDSKYLINEARRAY::getNumberOfI(int i) const throw (MEDEXCEPTION)
 {
   if (i<1)
@@ -104,7 +116,7 @@ inline int MEDSKYLINEARRAY::getNumberOfI(int i) const throw (MEDEXCEPTION)
   if (i>_count)
     throw MEDEXCEPTION("MEDSKYLINEARRAY::getNumberOfI : argument is out of range");
   return _index[i]-_index[i-1] ;
-} ;
+} 
 inline const int* MEDSKYLINEARRAY::getI(int i) const throw (MEDEXCEPTION)
 {
     if (i<1)