Salome HOME
Added unit-test that checks the issue #1379 is fixed
[modules/shaper.git] / src / ExchangePlugin / ExchangePlugin_Validators.h
index 3f1bb793b76ca9adfeaec7b35912438d7409ca64..ffaa7664dab47eb3c07bb61758bea0509d473dd9 100644 (file)
@@ -1,8 +1,22 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File:        SketchPlugin_Validators.h
-// Created:     01 Aug 2014
-// Author:      Vitaly SMETANNIKOV
+// Copyright (C) 2014-2017  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<mailto:webmaster.salome@opencascade.com>
+//
 
 #ifndef EXCHANGEPLUGIN_VALIDATORS_H
 #define EXCHANGEPLUGIN_VALIDATORS_H
@@ -10,7 +24,8 @@
 #include "ExchangePlugin.h"
 #include <ModelAPI_AttributeValidator.h>
 
-/**\class ExchangePlugin_ImportFormatValidator
+/**
+ * \class ExchangePlugin_FormatValidator
  * \ingroup Validators
  * \brief Validator for the imported formats checking
  *
  * about which formats are supported and the extension of the associated files.
  * This validator filters out files that are out of this description.
  */
-class ExchangePlugin_ImportFormatValidator : public ModelAPI_AttributeValidator
+class ExchangePlugin_FormatValidator : public ModelAPI_AttributeValidator
 {
   /**
-   * Parses input arguments "BREP:BREPImport", "STEP:STEPImport"
-   * into list of file formats "BREP","STEP"
+   * Parses input arguments "BREP:BREPImport", "STEP|STP:STEPImport"
+   * into list of file formats "BREP","STEP","STP"
    * and list of corresponding plugins: "BREPImport", "STEPImport"
    */
   static bool parseFormats(const std::list<std::string>& theArguments,
@@ -33,9 +48,27 @@ public:
    * allowed formats.
    */
   virtual bool isValid(const AttributePtr& theAttribute,
-                       const std::list<std::string>& theArguments) const;
+                       const std::list<std::string>& theArguments,
+                       Events_InfoMessage& theError) const;
+};
+
+/**
+ * \class ExchangePlugin_ImportFormatValidator
+ * \ingroup Validators
+ * \brief Validator for the import format.
+ */
+class ExchangePlugin_ImportFormatValidator : public ExchangePlugin_FormatValidator
+{
 
+};
 
+/**
+ * \class ExchangePlugin_ExportFormatValidator
+ * \ingroup Validators
+ * \brief Validator for the export format.
+ */
+class ExchangePlugin_ExportFormatValidator : public ExchangePlugin_FormatValidator
+{
 
 };