]> Creatis software - gdcm.git/blobdiff - src/gdcmDicomDirElement.h
* Some classes inherit now from gdcm::RefCounter
[gdcm.git] / src / gdcmDicomDirElement.h
index 74b18e0331128a7ea60cfab4388f97d0038b3bdb..37c605ec09ddf71e7b8277734254b12a18351d0c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirElement.h,v $
   Language:  C++
-  Date:      $Date: 2005/10/19 12:01:50 $
-  Version:   $Revision: 1.32 $
+  Date:      $Date: 2005/10/25 14:52:33 $
+  Version:   $Revision: 1.33 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -19,7 +19,7 @@
 #ifndef GDCMDICOMDIRELEMENT_H
 #define GDCMDICOMDIRELEMENT_H
 
-#include "gdcmCommon.h"
+#include "gdcmRefCounter.h"
 
 #include <list>
 
@@ -65,13 +65,14 @@ typedef std::list<DicomElement> ListDicomDirFiducialElem;
  * \brief   Represents elements contained in a DicomDir class
  *          for the chained lists from the file 'Dicts/DicomDir.dic'
  */
-class GDCM_EXPORT DicomDirElement
+class GDCM_EXPORT DicomDirElement : public RefCounter
 {
+   gdcmTypeMacro(DicomDirElement);
+
 public:
-   DicomDirElement();
-   ~DicomDirElement();
+   static DicomDirElement *New() {return new DicomDirElement();}
 
-  /**
+   /**
     * \brief   canonical Printer 
     */ 
    void Print(std::ostream &os);
@@ -124,6 +125,10 @@ public:
    void AddDicomDirElement(DicomDirType type,
                            uint16_t group, uint16_t elem);
 
+protected:
+   DicomDirElement();
+   ~DicomDirElement();
+
 private:
    /// Elements chained list, related to the MetaElements of DICOMDIR
    ListDicomDirMetaElem    DicomDirMetaList;