X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FExchangePlugin%2FExchangePlugin_Validators.h;h=ab1a142f9a2fb72b2450307987189a4ff7c15388;hb=f5c7bb3100ed321392da42f61c2ab505833ec61a;hp=3f1bb793b76ca9adfeaec7b35912438d7409ca64;hpb=56a8a18ec7662acd66454b5e8b624127c0577784;p=modules%2Fshaper.git diff --git a/src/ExchangePlugin/ExchangePlugin_Validators.h b/src/ExchangePlugin/ExchangePlugin_Validators.h index 3f1bb793b..ab1a142f9 100644 --- a/src/ExchangePlugin/ExchangePlugin_Validators.h +++ b/src/ExchangePlugin/ExchangePlugin_Validators.h @@ -1,8 +1,8 @@ // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -// File: SketchPlugin_Validators.h -// Created: 01 Aug 2014 -// Author: Vitaly SMETANNIKOV +// File: ExchangePlugin_Validators.h +// Created: Aug 01, 2014 +// Author: Sergey BELASH #ifndef EXCHANGEPLUGIN_VALIDATORS_H #define EXCHANGEPLUGIN_VALIDATORS_H @@ -10,7 +10,8 @@ #include "ExchangePlugin.h" #include -/**\class ExchangePlugin_ImportFormatValidator +/** + * \class ExchangePlugin_FormatValidator * \ingroup Validators * \brief Validator for the imported formats checking * @@ -18,11 +19,11 @@ * 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& theArguments, @@ -33,9 +34,27 @@ public: * allowed formats. */ virtual bool isValid(const AttributePtr& theAttribute, - const std::list& theArguments) const; + const std::list& theArguments, + std::string& 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 +{ };