-// 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__
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
{
void set( const int &size, const T *pointer ) ;
PointerOf<T>& operator=( const PointerOf<T> &pointer ) ;
} ;
+} ;
// ------------------------------------------------------------ //
// //
// //
// ------------------------------------------------------------ //
+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)
- 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");