Salome HOME
bos #20661 EDF 22847 - Move to the end
[modules/shaper.git] / src / ExchangePlugin / ExchangePlugin_Validators.h
index b4b6a437eea922e443293ca1072dbc7336ea4524..6f345f9bbec0476e003a06285c9f73167b33ea75 100644 (file)
@@ -1,8 +1,21 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File:    ExchangePlugin_Validators.h
-// Created: Aug 01, 2014
-// Author:  Sergey BELASH
+// 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
+// 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
+//
 
 #ifndef EXCHANGEPLUGIN_VALIDATORS_H
 #define EXCHANGEPLUGIN_VALIDATORS_H
@@ -35,17 +48,43 @@ public:
    */
   virtual bool isValid(const AttributePtr& theAttribute,
                        const std::list<std::string>& theArguments,
-                       std::string& theError) const;
+                       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
 {
 
 };
 
+/**
+ *  Check the selected result is in history (avoid Origin and coordinate axes and planes).
+ */
+class ExchangePlugin_InHistoryValidator : public ModelAPI_AttributeValidator
+{
+public:
+  /// \return True if the attribute is valid.
+  ///         It checks whether the selected object is in history.
+  /// \param[in] theAttribute an attribute to check
+  /// \param[in] theArguments a filter parameters
+  /// \param[out] theError error message.
+  virtual bool isValid(const AttributePtr& theAttribute,
+                       const std::list<std::string>& theArguments,
+                       Events_InfoMessage& theError) const;
+};
+
 #endif