Salome HOME
Copyright update 2020
[modules/shaper.git] / src / Config / Config_ValidatorReader.cpp
index 0cbc6702386e66579ba12e89a30c58ed41425c14..67516e19484ddc56318717ab7639f5e650fc629b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2020  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
 //
 // 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
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-/*
- * Config_ValidatorReader.cpp
- *
- *  Created on: Mar 20, 2015
- *      Author: sbh
- */
-
 #include <Config_ValidatorReader.h>
 #include <Config_Keywords.h>
 #include <Config_Common.h>
@@ -40,8 +33,8 @@
 #include <iostream>
 #endif
 
-Config_ValidatorReader::Config_ValidatorReader(const std::string& theXmlFileName)
-: Config_XMLReader(theXmlFileName)
+Config_ValidatorReader::Config_ValidatorReader(const std::string& theXmlFileName, bool isXMLContent)
+: Config_XMLReader(theXmlFileName, isXMLContent)
 {
 }
 
@@ -92,6 +85,8 @@ void Config_ValidatorReader::processValidator(xmlNodePtr theNode)
   aMessage->setValidatorId(aValidatorId);
   aMessage->setValidatorParameters(aParameters);
   std::string aFeatureId = restoreAttribute(NODE_FEATURE, _ID);
+  if (aFeatureId.length() == 0)
+    aFeatureId = myExtFeatureId;
   aMessage->setFeatureId(aFeatureId);
   // parent is attribute (widget)
   if (!myCurrentWidget.empty()) {