]> SALOME platform Git repositories - modules/superv.git/blobdiff - src/GraphBase/DataFlowBase_XmlHandler.cxx
Salome HOME
NRI : Merge delta [V1_2, V1_2c].
[modules/superv.git] / src / GraphBase / DataFlowBase_XmlHandler.cxx
index 9330837d4544013b78f392ebcdd1bfff9fba0763..662a680d903424cb92f5fe94b02bba4ba6739a09 100644 (file)
@@ -80,7 +80,7 @@ bool GraphBase::XmlHandler::startElement( const QString&, const QString&,
     dataflowxml = TRUE;
   }
   if ( dataflowxml ) {
-    fieldname[depth++] = qName ;
+    fieldname[depth++] = (const char * ) qName ;
   }
   if ( depth == maxlevel+1 )
     return false ;
@@ -296,7 +296,7 @@ bool GraphBase::XmlHandler::endElement( const QString&,
             if ( fieldvalue[depth] == NULLSTRING )
               return returnfalse( this , "depth3-3" , qName ) ;
 // kind ok
-            sscanf( fieldvalue[depth].c_str() ,"%d" , &aNode.theKind ) ;
+            sscanf( fieldvalue[depth].c_str() ,"%d" , (int * ) &aNode.theKind ) ;
             fieldvalue[depth] = NULLSTRING ;
             step[depth]++ ;
             step[4] = 0 ;
@@ -375,7 +375,7 @@ bool GraphBase::XmlHandler::endElement( const QString&,
             char Date[23] ;
             strcpy( Date , fieldvalue[depth].c_str() ) ;
             int i ;
-            for ( i = 0 ; i < strlen(Date) ; i++ ) {
+            for ( i = 0 ; i < (int ) strlen(Date) ; i++ ) {
               if ( Date[i] == '/' || Date[i] == '-' || Date[i] == ':' )
                 Date[i] = ' ' ;
            }
@@ -406,7 +406,7 @@ bool GraphBase::XmlHandler::endElement( const QString&,
             char Date[23] ;
             strcpy( Date , fieldvalue[depth].c_str() ) ;
             int i ;
-            for ( i = 0 ; i < strlen(Date) ; i++ ) {
+            for ( i = 0 ; i < (int ) strlen(Date) ; i++ ) {
               if ( Date[i] == '/' || Date[i] == '-' || Date[i] == ':' )
                 Date[i] = ' ' ;
            }
@@ -486,7 +486,7 @@ bool GraphBase::XmlHandler::endElement( const QString&,
           if ( qName == "x-position" ) {
             if ( fieldvalue[depth] == NULLSTRING )
               return returnfalse( this , "depth3-14" , qName ) ;
-            sscanf( fieldvalue[depth].c_str() , "%d" , &aNode.theCoords.theX ) ;
+            sscanf( fieldvalue[depth].c_str() , "%ld" , &aNode.theCoords.theX ) ;
             fieldvalue[depth] = NULLSTRING ;
             step[depth]++ ;
 // x-position ok
@@ -498,7 +498,7 @@ bool GraphBase::XmlHandler::endElement( const QString&,
           if ( qName == "y-position" ) {
             if ( fieldvalue[depth] == NULLSTRING )
               return returnfalse( this , "depth3-15" , qName ) ;
-            sscanf( fieldvalue[depth].c_str() , "%d" , &aNode.theCoords.theY ) ;
+            sscanf( fieldvalue[depth].c_str() , "%ld" , &aNode.theCoords.theY ) ;
             fieldvalue[depth] = NULLSTRING ;
             step[depth]++ ;
 // y-position ok
@@ -755,7 +755,7 @@ bool GraphBase::XmlHandler::endElement( const QString&,
           if ( qName == "coord" ) {
             if ( fieldvalue[depth] != NULLSTRING )
               return returnfalse( this , "depth4-5" , qName ) ;
-            if ( VXSize == VX.size() ) {
+            if ( VXSize == (int ) VX.size() ) {
               VX.resize( VX.size() + 10 ) ;
               VY.resize( VY.size() + 10 ) ;
            }
@@ -867,7 +867,12 @@ bool GraphBase::XmlHandler::endElement( const QString&,
           if ( qName == "inParameter-type" ) {
             if ( fieldvalue[depth] == NULLSTRING )
               return returnfalse( this , "depth5-4" , qName ) ;
-            aParameter.Parametertype = fieldvalue[depth].c_str() ;
+            if ( strcmp( fieldvalue[depth].c_str() , "?" ) ) {
+              aParameter.Parametertype = fieldvalue[depth].c_str() ;
+           }
+            else {
+              aParameter.Parametertype = "" ;
+           }
             fieldvalue[depth] = NULLSTRING ;
             step[depth]++ ;
           }
@@ -878,7 +883,12 @@ bool GraphBase::XmlHandler::endElement( const QString&,
           if ( qName == "inParameter-name" ) {
             if ( fieldvalue[depth] == NULLSTRING )
               return returnfalse( this , "depth5-5" , qName ) ;
-            aParameter.Parametername = fieldvalue[depth].c_str() ;
+            if ( strcmp( fieldvalue[depth].c_str() , "?" ) ) {
+              aParameter.Parametername = fieldvalue[depth].c_str() ;
+           }
+            else {
+              aParameter.Parametername = "" ;
+           }
             fieldvalue[depth] = NULLSTRING ;
             step[depth]++ ;
           }
@@ -889,7 +899,12 @@ bool GraphBase::XmlHandler::endElement( const QString&,
           if ( qName == "outParameter-type" ) {
             if ( fieldvalue[depth] == NULLSTRING )
               return returnfalse( this , "depth5-6" , qName ) ;
-            aParameter.Parametertype = fieldvalue[depth].c_str() ;
+            if ( strcmp( fieldvalue[depth].c_str() , "?" ) ) {
+              aParameter.Parametertype = fieldvalue[depth].c_str() ;
+           }
+            else {
+              aParameter.Parametertype = "" ;
+           }
             fieldvalue[depth] = NULLSTRING ;
             step[depth]++ ;
           }
@@ -900,7 +915,12 @@ bool GraphBase::XmlHandler::endElement( const QString&,
           if ( qName == "outParameter-name" ) {
             if ( fieldvalue[depth] == NULLSTRING )
               return returnfalse( this , "depth5-7" , qName ) ;
-            aParameter.Parametername = fieldvalue[depth].c_str() ;
+            if ( strcmp( fieldvalue[depth].c_str() , "?" ) ) {
+              aParameter.Parametername = fieldvalue[depth].c_str() ;
+           }
+            else {
+              aParameter.Parametername = "" ;
+           }
             fieldvalue[depth] = NULLSTRING ;
             step[depth]++ ;
           }
@@ -1039,7 +1059,7 @@ bool GraphBase::XmlHandler::characters( const QString& ch ) {
   if ( depth < 0 || fieldvalue[depth] != NULLSTRING )
     return returnfalse( this , "characters " , ch ) ;
 
-  fieldvalue[depth] = ch ;
+  fieldvalue[depth] = (const char * ) ch ;
   return TRUE;
 }