]> Creatis software - gdcm.git/blobdiff - src/gdcmDocEntry.h
Shorten up the code, and avoid memory leaks.
[gdcm.git] / src / gdcmDocEntry.h
index d7fecfc3418fcdc6c53b7007893c346b04cbe9e3..acd1eb731691de927405863b826d33f7ec9661bc 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntry.h,v $
   Language:  C++
-  Date:      $Date: 2005/10/18 08:35:49 $
-  Version:   $Revision: 1.50 $
+  Date:      $Date: 2005/10/20 15:24:09 $
+  Version:   $Revision: 1.53 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -39,8 +39,7 @@ class GDCM_EXPORT DocEntry : public Base
 {
 public:
    DocEntry(DictEntry*);
-   /// \brief Canonical Destructor
-   virtual ~DocEntry() {}
+   virtual ~DocEntry();
 
    virtual void Print (std::ostream &os = std::cout, std::string const &indent = ""); 
    virtual void WriteContent(std::ofstream *fp, FileType filetype);
@@ -55,11 +54,8 @@ public:
    /// Returns the Dicom Element number of the current Dicom entry
    const uint16_t &GetElement() const { return DicomDict->GetElement();}
 
-   /// Set the 'key' of the current Dicom entry
-   void  SetKey( TagKey const &key ) { Key = key; }
-
    /// Returns the 'key' of the current Dicom entry
-   TagKey const &GetKey() const { return Key; }
+   TagKey GetKey() const { return DicomDict->GetKey(); }
 
    /// \brief Returns the 'Name' '(e.g. "Patient's Name") found in the Dicom
    /// Dictionnary of the current Dicom Header Entry
@@ -68,7 +64,7 @@ public:
    /// \brief Returns the 'Value Representation' (e.g. "PN" : Person Name,
    /// "SL" : Signed Long), found in the Dicom header or in the Dicom
    /// Dictionnary, of the current Dicom entry
-   std::string const &GetVR() const { return DicomDict->GetVR(); }
+   VRKey const &GetVR() const { return DicomDict->GetVR(); }
 
    /// \brief Returns the 'Value Multiplicity' (e.g. "1", "1-n", "6"),
    /// found in the Dicom entry or in the Dicom Dictionnary
@@ -148,10 +144,6 @@ protected:
    /// Offset from the beginning of file for direct user access
    size_t Offset; 
 
-   /// \brief Generalized key of this DocEntry (for details on
-   ///        the generalized key refer to \ref TagKey documentation).
-   TagKey Key;
-
 private:
 };
 } // end namespace gdcm