-// 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 ;
// 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 ) ;
inline void setIndexValue(int i, int value) throw (MEDEXCEPTION) ;
friend ostream& operator<<(ostream &os, const MEDSKYLINEARRAY &sky);
+ MEDSKYLINEARRAY* makeReverseArray();
+
};
// ---------------------------------------
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)
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)