]> Creatis software - gdcm.git/blobdiff - src/gdcmElValSet.cxx
FIX: VC++ warning about return type in main
[gdcm.git] / src / gdcmElValSet.cxx
index a672453712cd52d6536a706c37142c6d6bce7657..a2781df6249b882a6e15610bb07a321f66b37cf5 100644 (file)
@@ -1,18 +1,9 @@
 // gdcmElValSet.cxx
 
-#ifdef _MSC_VER
-// 'identifier' : class 'type' needs to have dll-interface to be used by
-// clients of class 'type2'
-#pragma warning ( disable : 4251 )
-// 'identifier' : identifier was truncated to 'number' characters in the
-// debug information
-#pragma warning ( disable : 4786 )
-#endif //_MSC_VER
-
-#include <sstream>
 #include "gdcmUtil.h"
 #include "gdcmElValSet.h"
 #include "gdcmTS.h"
+#include <sstream>
 
 gdcmElValSet::~gdcmElValSet() {
    for (TagElValueHT::iterator tag = tagHt.begin(); tag != tagHt.end(); ++tag) {
@@ -59,7 +50,7 @@ int gdcmElValSet::CheckIfExistByNumber(guint16 Group, guint16 Elem ) {
  * \ingroup gdcmElValSet
  * \brief   
  */
-void gdcmElValSet::Print(ostream & os) {
+void gdcmElValSet::Print(std::ostream & os) {
 
    size_t o;
    short int g, e;
@@ -79,7 +70,7 @@ void gdcmElValSet::Print(ostream & os) {
       os << tag->first << ": ";
       os << " lgr : " << tag->second->GetLength();
       os << ", Offset : " << o;
-      os << " x(" << hex << o << dec << ") ";
+      os << " x(" << std::hex << o << std::dec << ") ";
       os << "\t[" << tag->second->GetVR()    << "]";
       os << "\t[" << tag->second->GetName()  << "]";       
       os << "\t[" << d2 << "]";
@@ -94,7 +85,7 @@ void gdcmElValSet::Print(ostream & os) {
                os << "  ==>\t[" << ts->GetValue(v) << "]"; 
          }
       }              
-      os << endl;
+      os << std::endl;
    }
 } 
 
@@ -102,14 +93,14 @@ void gdcmElValSet::Print(ostream & os) {
  * \ingroup gdcmElValSet
  * \brief   
  */
-void gdcmElValSet::PrintByName(ostream & os) {
+void gdcmElValSet::PrintByName(std::ostream & os) {
    for (TagElValueNameHT::iterator tag = NameHt.begin();
           tag != NameHt.end();
           ++tag){
       os << tag->first << ": ";
       os << "[" << tag->second->GetValue() << "]";
       os << "[" << tag->second->GetKey()   << "]";
-      os << "[" << tag->second->GetVR()    << "]" << endl;
+      os << "[" << tag->second->GetVR()    << "]" << std::endl;
    }
 }
 
@@ -388,12 +379,12 @@ void gdcmElValSet::WriteElements(FileType type, FILE * _fp) {
    guint32 val_uint32;
    guint16 val_uint16;
    
-   vector<std::string> tokens;
+   std::vector<std::string> tokens;
 
    void *ptr;
 
    // Tout ceci ne marche QUE parce qu'on est sur un proc Little Endian 
-   // restent à tester les echecs en écriture (apres chaque fwrite)
+   // restent à tester les echecs en écriture (apres chaque fwrite)
 
    for (TagElValueHT::iterator tag2=tagHt.begin();
         tag2 != tagHt.end();
@@ -405,7 +396,7 @@ void gdcmElValSet::WriteElements(FileType type, FILE * _fp) {
       val = tag2->second->GetValue().c_str();
       vr =  tag2->second->GetVR();
       
-     // cout << "Tag "<< hex << gr << " " << el << "\n";
+     // std::cout << "Tag "<< std::hex << gr << " " << el << std::endl;
 
       if ( type == ACR ) { 
          if (gr < 0x0008)   continue; // ignore pure DICOM V3 groups