X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFeaturesAPI%2FFeaturesAPI_BooleanSmash.cpp;h=c23f639678f937da2fa8d0d135ea598798eb9c10;hb=2e0f664e66dc2b46796df2953f52871b10799173;hp=7c7583bbfa43c6e16fe96683daafcc7faf7e502e;hpb=e65bf14e2ff3cf853884bf8998fadcece6e3b34c;p=modules%2Fshaper.git diff --git a/src/FeaturesAPI/FeaturesAPI_BooleanSmash.cpp b/src/FeaturesAPI/FeaturesAPI_BooleanSmash.cpp index 7c7583bbf..c23f63967 100644 --- a/src/FeaturesAPI/FeaturesAPI_BooleanSmash.cpp +++ b/src/FeaturesAPI/FeaturesAPI_BooleanSmash.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2019 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 @@ -12,10 +12,9 @@ // // 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 +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or -// email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #include "FeaturesAPI_BooleanSmash.h" @@ -36,10 +35,12 @@ FeaturesAPI_BooleanSmash::FeaturesAPI_BooleanSmash( FeaturesAPI_BooleanSmash::FeaturesAPI_BooleanSmash( const std::shared_ptr& theFeature, const std::list& theMainObjects, - const std::list& theToolObjects) + const std::list& theToolObjects, + const int theVersion) : ModelHighAPI_Interface(theFeature) { if(initialize()) { + fillAttribute(theVersion, theFeature->integer(FeaturesPlugin_Boolean::VERSION_ID())); fillAttribute(theMainObjects, mymainObjects); fillAttribute(theToolObjects, mytoolObjects); @@ -83,17 +84,26 @@ void FeaturesAPI_BooleanSmash::dump(ModelHighAPI_Dumper& theDumper) const aBase->selectionList(FeaturesPlugin_BooleanSmash::OBJECT_LIST_ID()); AttributeSelectionListPtr aTools = aBase->selectionList(FeaturesPlugin_BooleanSmash::TOOL_LIST_ID()); + AttributeIntegerPtr aVersion = + aBase->integer(FeaturesPlugin_BooleanSmash::VERSION_ID()); + + theDumper << "(" << aDocName << ", " << anObjects << ", " << aTools; + + if (aVersion && aVersion->isInitialized()) + theDumper << ", " << aVersion->value(); - theDumper << "(" << aDocName << ", " << anObjects << ", " << aTools << ")" << std::endl; + theDumper << ")" << std::endl; } //================================================================================================== BooleanSmashPtr addSmash(const std::shared_ptr& thePart, const std::list& theMainObjects, - const std::list& theToolObjects) + const std::list& theToolObjects, + const int theVersion) { std::shared_ptr aFeature = thePart->addFeature(FeaturesAPI_BooleanSmash::ID()); return BooleanSmashPtr(new FeaturesAPI_BooleanSmash(aFeature, theMainObjects, - theToolObjects)); + theToolObjects, + theVersion)); }