X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FParametersPlugin%2FParametersPlugin_Plugin.cpp;h=5b99ca5b0fb3ea54c8061c96cc2e4b2def991412;hb=595f0f93f05c93b1eac03153afae9783098182e6;hp=9affdd7a1297dd255121805386702dd92ca4f40e;hpb=9b6fa5ea0662642f58e278af3798f4dc9ddd0acf;p=modules%2Fshaper.git diff --git a/src/ParametersPlugin/ParametersPlugin_Plugin.cpp b/src/ParametersPlugin/ParametersPlugin_Plugin.cpp index 9affdd7a1..5b99ca5b0 100644 --- a/src/ParametersPlugin/ParametersPlugin_Plugin.cpp +++ b/src/ParametersPlugin/ParametersPlugin_Plugin.cpp @@ -1,9 +1,34 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D +// Copyright (C) 2014-2022 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 #include #include +#include +#include +#include + +#include #include +#include #include @@ -13,8 +38,21 @@ static ParametersPlugin_Plugin* MY_PARAMETERSPLUGIN_INSTANCE = new ParametersPlu ParametersPlugin_Plugin::ParametersPlugin_Plugin() { // register this plugin + WidgetCreatorFactoryPtr aWidgetCreatorFactory = ModuleBase_WidgetCreatorFactory::get(); + aWidgetCreatorFactory->registerCreator( + std::shared_ptr(new ParametersPlugin_WidgetCreator())); + SessionPtr aSession = ModelAPI_Session::get(); aSession->registerPlugin(this); + + ModelAPI_ValidatorsFactory* aFactory = aSession->validators(); + aFactory->registerValidator("Parameters_VariableValidator", + new ParametersPlugin_VariableValidator); + aFactory->registerValidator("Parameters_ExpressionValidator", + new ParametersPlugin_ExpressionValidator); + + myEvalListener = + std::shared_ptr(new ParametersPlugin_EvalListener()); } FeaturePtr ParametersPlugin_Plugin::createFeature(std::string theFeatureID) @@ -23,6 +61,9 @@ FeaturePtr ParametersPlugin_Plugin::createFeature(std::string theFeatureID) if (theFeatureID == ParametersPlugin_Parameter::ID()) { return FeaturePtr(new ParametersPlugin_Parameter); } + if (theFeatureID == ParametersPlugin_ParametersMgr::ID()) { + return FeaturePtr(new ParametersPlugin_ParametersMgr); + } return FeaturePtr(); }