]> Creatis software - gdcm.git/blobdiff - src/gdcmRefCounter.h
Swap64 deals with double (VR=FD)
[gdcm.git] / src / gdcmRefCounter.h
index a5e39fe34eaed7c9d028de939fce8c36c914cfff..ce9858acaef3bbf7c8c8715f79dfd66cb1cc1414 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmRefCounter.h,v $
   Language:  C++
-  Date:      $Date: 2005/10/21 15:34:56 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2005/10/26 15:41:29 $
+  Version:   $Revision: 1.8 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -35,35 +35,28 @@ class GDCM_EXPORT RefCounter : public Base
 
 public:
 // Allocator / Unallocator
-   /// Delete the object
+   /// \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
-   /// Register the object
+   /// \brief Register the object
    /// \remarks It increments the reference counting
-   inline void Register(void)
-   {
-      RefCount++;
-   }
-   /// Unregister the object
+   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;
-      }
    }
-   /// Get the reference counting
+   /// \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: