Salome HOME
DCQ:prepare 2.0.0
[modules/med.git] / src / MEDMEM / MEDMEM_PointerOf.hxx
index cc68738cf345777e1ee3b87ca575d7886c2d3664..be3201043b2a4ffd0c656516744a4e4b54dedf64 100644 (file)
@@ -1,29 +1,3 @@
-//  MED MEDMEM : MED files in memory
-//
-//  Copyright (C) 2003  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 
-//  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 
-//  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 
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
-// 
-//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
-//
-//
-//
-//  File   : MEDMEM_PointerOf.hxx
-//  Module : MED
-
 # if ! defined( __PointerOf_HXX__ )
 # define __PointerOf_HXX__
 
@@ -39,6 +13,7 @@
         In these cases, memory will be desallocated at object destruction. In all other cases,
        the desallocator will only nullify pointers.
 */
+namespace MEDMEM {
 
 template <typename T> class PointerOf
 {
@@ -63,6 +38,7 @@ public :
        void set( const int &size, const T *pointer ) ;
        PointerOf<T>& operator=( const PointerOf<T> &pointer ) ;
 } ;
+} ;
 
 // ------------------------------------------------------------ //
 //                                                             //
@@ -70,6 +46,7 @@ public :
 //                                                             //
 // ------------------------------------------------------------ //
 
+using namespace MEDMEM;
 
 /*! Creates a null T* pointer and sets the boolean (for desallocation) to false. */
 template <typename T> PointerOf<T>::PointerOf() : _pointer(0), _done(false)
@@ -82,8 +59,8 @@ template <typename T> PointerOf<T>::PointerOf() : _pointer(0), _done(false)
     - The "old" PointerOf always has propriety of the pointed memory. \n
     - If the "old" PointerOf is detroyed, the "new" PointerOf points
       a desallocated memory zone. */
-template <typename T> PointerOf<T>::PointerOf(const PointerOf<T> & pointerOf) : _done(false),
-                                                                               _pointer((T*)(const T* const)pointerOf)
+template <typename T> PointerOf<T>::PointerOf(const PointerOf<T> & pointerOf) :
+  _pointer((T*)(const T* const)pointerOf), _done(false)
 {
        BEGIN_OF("PointerOf<T>::PointerOf(const PointerOf<T> & pointerOf)");
        MESSAGE("Warning ! No Propriety Transfer");