X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSetPlugin%2FPartSetPlugin_Plugin.cpp;h=3141f52739e62e2866e7ae1ee3a6ac9b65ce30c5;hb=5a7b701bf0530d9fbdb624150fa41676696860c3;hp=c4d50434636509f50168f7a0aef153dd3e96e73b;hpb=3efd29f07fa128246690fd24a3439048b5e95878;p=modules%2Fshaper.git diff --git a/src/PartSetPlugin/PartSetPlugin_Plugin.cpp b/src/PartSetPlugin/PartSetPlugin_Plugin.cpp index c4d504346..3141f5273 100644 --- a/src/PartSetPlugin/PartSetPlugin_Plugin.cpp +++ b/src/PartSetPlugin/PartSetPlugin_Plugin.cpp @@ -1,4 +1,22 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D +// 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 +// #include "PartSetPlugin_Plugin.h" #include "PartSetPlugin_Part.h" @@ -14,8 +32,6 @@ #include #endif -using namespace std; - // the only created instance of this plugin static PartSetPlugin_Plugin* MY_PARTSET_INSTANCE = new PartSetPlugin_Plugin(); @@ -25,7 +41,7 @@ PartSetPlugin_Plugin::PartSetPlugin_Plugin() ModelAPI_Session::get()->registerPlugin(this); } -FeaturePtr PartSetPlugin_Plugin::createFeature(string theFeatureID) +FeaturePtr PartSetPlugin_Plugin::createFeature(std::string theFeatureID) { if (theFeatureID == PartSetPlugin_Part::ID()) { return FeaturePtr(new PartSetPlugin_Part); @@ -39,7 +55,8 @@ FeaturePtr PartSetPlugin_Plugin::createFeature(string theFeatureID) // feature of such kind is not found return FeaturePtr(); } - +// used only in GUI +//LCOV_EXCL_START void PartSetPlugin_Plugin::processEvent(const std::shared_ptr& theMessage) { const Events_ID kRequestEvent = @@ -58,8 +75,8 @@ std::shared_ptr PartSetPlugin_Plugin::getFeaturesS { const Events_ID kResponseEvent = Events_Loop::loop()->eventByName(EVENT_FEATURE_STATE_RESPONSE); - std::shared_ptr aMsg = - std::make_shared(kResponseEvent, this); + std::shared_ptr aMsg( + new ModelAPI_FeatureStateMessage(kResponseEvent, this)); std::string aStdDocKind = ModelAPI_Session::get()->activeDocument()->kind(); bool aDocIsPart = (aStdDocKind == PartSetPlugin_Part::ID()); aMsg->setState(PartSetPlugin_Part::ID(), true); @@ -67,3 +84,4 @@ std::shared_ptr PartSetPlugin_Plugin::getFeaturesS aMsg->setState(PartSetPlugin_Remove::ID(), aDocIsPart); return aMsg; } +//LCOV_EXCL_STOP