]> Creatis software - gdcm.git/blobdiff - src/gdcmSQItem.cxx
Two ;; at end of line can cause troubles
[gdcm.git] / src / gdcmSQItem.cxx
index c0d3b27d2925525ab203f655f1cc6d431e07816e..88c93b3ad21c7021b5c4dac7a2201488e63f54b1 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSQItem.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/07/06 08:43:18 $
-  Version:   $Revision: 1.73 $
+  Date:      $Date: 2005/09/06 17:15:25 $
+  Version:   $Revision: 1.75 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -85,7 +85,9 @@ void SQItem::WriteContent(std::ofstream *fp, FileType filetype)
       // we just *always* ignore spurious fffe|0000 tag ! 
       if ( (*it)->GetGroup() == 0xfffe && (*it)->GetElement() == 0x0000 )
       {
-         break; // FIXME : continue; ?!?
+          break; // FIXME : break or continue; ?!?  
+                 // --> makes no difference since the only bugged file we have
+                 // contains 'impossible tag' fffe|0000 in last position !                            
       }
 
       (*it)->WriteContent(fp, filetype);
@@ -198,6 +200,24 @@ void SQItem::ClearEntry()
    DocEntries.clear();
 }
 
+/**
+ * \brief  Clear the std::list from given Sequence Item  BUT keep the entries
+ */
+void SQItem::ClearEntryNoDestroy()
+{
+   DocEntries.clear();
+}
+
+
+/**
+ * \brief  Move all the entries from a given Sequence Item 
+ */
+void SQItem::MoveObject(SQItem *source)
+{
+   DocEntries = source->DocEntries;
+   source->ClearEntryNoDestroy();
+}
+
 /**
  * \brief   Get the first Dicom entry while visiting the SQItem
  * \return  The first DocEntry if found, otherwhise 0