Salome HOME
Add --init_port option to driver command.
[modules/yacs.git] / src / engine / Proc.cxx
index 2eaaddaebe1799ec09b25fb53ee6be51f3f25c23..f09f95ebeb4806f2ad93d661eccd23c48965570d 100644 (file)
@@ -300,18 +300,29 @@ std::string Proc::setInPortValue(std::string nodeName, std::string portName, std
               double val = atof(value.c_str());
               inputPort->edInit(val);
             }
+            break;
           case Int:
             {
               int val = atoi(value.c_str());
               inputPort->edInit(val);
             }
+            break;
           case String:
             inputPort->edInit(value.c_str());
+            break;
           case Bool:
             {
-              bool val = (! value.compare("False") ) && (! value.compare("0") );
-              inputPort->edInit(val);
+              if((!value.compare("False")) || (!value.compare("false")))
+                inputPort->edInit(false);
+              else if ((!value.compare("True")) || (!value.compare("true")))
+                inputPort->edInit(true);
+              else
+              {
+                int val = atoi(value.c_str());
+                inputPort->edInit(val);
+              }
             }
+            break;
           default:
             DEBTRACE("Proc::setInPortValue: filtered type: " << inputPort->edGetType()->kind());
         }