]> Creatis software - gdcm.git/blobdiff - src/gdcmBinEntry.cxx
BUG: Fix for picky compiler
[gdcm.git] / src / gdcmBinEntry.cxx
index a28e9a5a9edbc27f073ba6fada602613c059de51..e4460c60b12c365f6e3b306dee341bc7f762e131 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmBinEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/25 15:21:20 $
-  Version:   $Revision: 1.57 $
+  Date:      $Date: 2005/02/02 10:02:16 $
+  Version:   $Revision: 1.61 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
 
 namespace gdcm 
 {
-
 //-----------------------------------------------------------------------------
 // Constructor / Destructor
-
 /**
  * \brief   Constructor from a given BinEntry
  */
-BinEntry::BinEntry(DictEntry *e) : ContentEntry(e)
+BinEntry::BinEntry(DictEntry *e) 
+         :ContentEntry(e)
 {
    BinArea = 0;
    SelfArea = true;
@@ -44,7 +43,8 @@ BinEntry::BinEntry(DictEntry *e) : ContentEntry(e)
  * \brief   Constructor from a given BinEntry
  * @param   e Pointer to existing Doc entry
  */
-BinEntry::BinEntry(DocEntry *e) : ContentEntry(e->GetDictEntry())
+BinEntry::BinEntry(DocEntry *e) 
+        : ContentEntry(e->GetDictEntry())
 {
    Copy(e);
 
@@ -64,42 +64,9 @@ BinEntry::~BinEntry()
    }
 }
 
-
 //-----------------------------------------------------------------------------
-// Print
+// Public
 /**
- * \brief   Prints a BinEntry (Dicom entry)
- * @param   os ostream we want to print in
- * @param indent Indentation string to be prepended during printing
- */
-void BinEntry::Print(std::ostream &os, std::string const & )
-{
-   os << "B ";
-   DocEntry::Print(os);
-   std::ostringstream s;
-   void* binArea = GetBinArea();
-   if (binArea)
-   {
-      //s << " [" << GDCM_BINLOADED 
-      s << " [" << GetValue()
-        << "; length = " << GetLength() << "]";
-   }
-   else
-   {
-      if ( GetLength() == 0 )
-      {
-         s << " []";
-      }
-      else 
-      {
-         //s << " [gdcm::Binary data NOT loaded]";
-         s << " [" <<GetValue() << "]";
-      }         
-   }
-   os << s.str();
-}
-
-/*
  * \brief   canonical Writer
  * @param fp already open file pointer
  * @param filetype type of the file (ACR, ImplicitVR, ExplicitVR, ...)
@@ -169,11 +136,10 @@ void BinEntry::WriteContent(std::ofstream *fp, FileType filetype)
       fp->seekp(lgr, std::ios::cur);
    }
 }
-//-----------------------------------------------------------------------------
-// Public
 
-
-/// \brief Sets the value (non string) of the current Dicom Header Entry
+/**
+ * \brief Sets the value (non string) of the current Dicom Header Entry
+ */
 void BinEntry::SetBinArea( uint8_t *area, bool self )  
 { 
    if (BinArea && SelfArea)
@@ -189,5 +155,37 @@ void BinEntry::SetBinArea( uint8_t *area, bool self )
 //-----------------------------------------------------------------------------
 // Private
    
+//-----------------------------------------------------------------------------
+// Print
+/**
+ * \brief   Prints a BinEntry (Dicom entry)
+ * @param   os ostream we want to print in
+ * @param indent Indentation string to be prepended during printing
+ */
+void BinEntry::Print(std::ostream &os, std::string const & )
+{
+   os << "B ";
+   DocEntry::Print(os);
+   std::ostringstream s;
+   void* binArea = GetBinArea();
+   if (binArea)
+   {
+      s << " [" << GetValue()
+        << "; length = " << GetLength() << "]";
+   }
+   else
+   {
+      if ( GetLength() == 0 )
+      {
+         s << " []";
+      }
+      else 
+      {
+         s << " [" <<GetValue() << "]";
+      }         
+   }
+   os << s.str();
+}
+
 //-----------------------------------------------------------------------------
 } // end namespace gdcm