Salome HOME
Debug of CMake build procedure
[tools/medcoupling.git] / src / MEDCoupling / MEDCouplingAutoRefCountObjectPtr.hxx
index fc0c0f4e9a5de28061d285c7dea7c935cbdb0895..d80ca915c167c7ada350e9fe4a1fcd0545ba5f19 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D
 //
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -41,6 +41,7 @@ namespace ParaMEDMEM
     const T& operator*() const { return *_ptr; }
     operator T *() { return _ptr; }
     operator const T *() const { return _ptr; }
+    T *retn() { if(_ptr) _ptr->incrRef(); return _ptr; }
   private:
     void referPtr(T *ptr) { _ptr=ptr; if(_ptr) _ptr->incrRef(); }
     void destroyPtr() { if(_ptr) _ptr->decrRef(); }