]> Creatis software - gdcm.git/blobdiff - src/gdcmRefCounter.h
* Add Command and CommandManager to have possible callback
[gdcm.git] / src / gdcmRefCounter.h
index ee664d794356a8b88a27eaadce9443c161cf57cb..cafb784997905b96918f948b6a49ba5f778abc1e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmRefCounter.h,v $
   Language:  C++
-  Date:      $Date: 2005/10/23 15:06:34 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2005/11/28 15:20:34 $
+  Version:   $Revision: 1.9 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -20,7 +20,6 @@
 #define GDCMREFCOUNTER_H
 
 #include "gdcmBase.h"
-#include "gdcmDebug.h"
 
 namespace gdcm 
 {
@@ -37,33 +36,26 @@ public:
 // Allocator / Unallocator
    /// \brief Delete the object
    /// \remarks The object is deleted only if its reference counting is to zero
-   inline void Delete(void)
-   {
-      Unregister();
-   }
+   void Delete() { Unregister(); }
 
 // Reference count
    /// \brief Register the object
    /// \remarks It increments the reference counting
-   inline void Register(void)
-   {
-      RefCount++;
-   }
+   void Register() { RefCount++; }
+
    /// \brief Unregister the object
    /// \remarks It decrements the reference counting
-   inline void Unregister(void)
+   void Unregister()
    {
       RefCount--;
-      if(RefCount==0)
-      {
+      if(RefCount<=0)
          delete this;
-      }
    }
    /// \brief Get the reference counting
    /// \return Reference count
-   inline const unsigned long &GetRefCount(void) const
+   const unsigned long &GetRefCount() const
    {
-      return(RefCount);
+      return RefCount;
    }
 
 protected: