]> Creatis software - gdcm.git/blobdiff - src/gdcmContentEntry.cxx
Reverse order sorting now works, even with user supplied function.
[gdcm.git] / src / gdcmContentEntry.cxx
index a2723218a83e4926e463a504a5fede60519847af..97c949e9bb62358f9f1a2a2be82c874cad54e7dc 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmContentEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/26 15:03:32 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2005/06/24 10:55:58 $
+  Version:   $Revision: 1.10 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -30,18 +30,12 @@ namespace gdcm
 
 //-----------------------------------------------------------------------------
 // Constructor / Destructor
-
-
-//-----------------------------------------------------------------------------
-// Public
-
-//-----------------------------------------------------------------------------
-// Protected
 /**
  * \brief   Constructor for a given DictEntry
  * @param   e Pointer to existing dictionary entry
  */
-ContentEntry::ContentEntry(DictEntry *e) : DocEntry(e)
+ContentEntry::ContentEntry(DictEntry *e) 
+            : DocEntry(e)
 {
    Value = GDCM_UNFOUND;
 }
@@ -51,7 +45,7 @@ ContentEntry::ContentEntry(DictEntry *e) : DocEntry(e)
  * @param   e Pointer to existing Doc entry
  */
 ContentEntry::ContentEntry(DocEntry *e)
-             : DocEntry(e->GetDictEntry())
+            : DocEntry(e->GetDictEntry())
 {
    Copy(e);
 }
@@ -62,6 +56,24 @@ ContentEntry::ContentEntry(DocEntry *e)
 ContentEntry::~ContentEntry ()
 {
 }
+
+//-----------------------------------------------------------------------------
+// Print
+
+//-----------------------------------------------------------------------------
+// Public
+void ContentEntry::Copy(DocEntry *doc)
+{
+   DocEntry::Copy(doc);
+
+   ContentEntry *entry = dynamic_cast<ContentEntry *>(doc);
+   if ( entry )
+      Value = entry->Value;
+}
+
+//-----------------------------------------------------------------------------
+// Protected
+
 //-----------------------------------------------------------------------------
 // Private