Salome HOME
Implementation of task "3.1. Ability to export the PartSet to GEOM"
[modules/shaper.git] / src / ParametersPlugin / ParametersPlugin_Validators.cpp
index c5804aeaed66fa06eed53648552635101f3e7b3a..1b47e66b6f6e499403ba88aa3a5dbb0b8137499e 100644 (file)
@@ -1,10 +1,21 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
-/*
- * Parameters_VariableValidator.cpp
- *
- *  Created on: Apr 9, 2015
- *      Author: sbh
- */
+// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
 
 #include <ParametersPlugin_Validators.h>
 
@@ -88,8 +99,6 @@ bool ParametersPlugin_ExpressionValidator::isValid(const AttributePtr& theAttrib
                                                    Events_InfoMessage& theError) const
 {
   FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(theAttribute->owner());
-  ResultParameterPtr aParam =
-      std::dynamic_pointer_cast<ModelAPI_ResultParameter>(aFeature->firstResult());
 
   AttributeStringPtr aStrAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeString>(theAttribute);
@@ -104,11 +113,6 @@ bool ParametersPlugin_ExpressionValidator::isValid(const AttributePtr& theAttrib
     return false;
   }
 
-  if (!aParam.get()) {
-    theError = "Result is empty.";
-    return false;
-  }
-
   theError = aFeature->string(ParametersPlugin_Parameter::EXPRESSION_ERROR_ID())->value();
   return theError.empty();
 }